         XCTAssertEqual(-Double(Float.infinity), (-Float.infinity).toDouble())
         XCTAssertEqual(-Double(Double.infinity), (-Double.infinity).toDouble())
         XCTAssertEqual(-Double(Float80.infinity), (-Float80.infinity).toDouble())
+
+        XCTAssert(CGFloat.nan.toDouble().isNaN)
+        XCTAssert(Float.nan.toDouble().isNaN)
+        XCTAssert(Double.nan.toDouble().isNaN)
+        XCTAssert(Float80.nan.toDouble().isNaN)
+
+        XCTAssert(CGFloat.signalingNaN.toDouble().isSignalingNaN)
+        XCTAssert(Float.signalingNaN.toDouble().isSignalingNaN)
+        XCTAssert(Double.signalingNaN.toDouble().isSignalingNaN)
+        XCTAssert(Float80.signalingNaN.toDouble().isSignalingNaN)
     }
 
     func testFloat80Conversion() {

        XCTAssertEqual(-Float(Float.infinity), (-Float.infinity).toFloat())
        XCTAssertEqual(-Float(Double.infinity), (-Double.infinity).toFloat())
        XCTAssertEqual(-Float(Float80.infinity), (-Float80.infinity).toFloat())
    }

    func testDoubleConversion() {

        XCTAssertEqualWithAccuracy(CGFloat(Double.pi), Double.pi.toCGFloat(), accuracy: cgEpsilon)
        XCTAssertEqualWithAccuracy(CGFloat(Float80.pi), Float80.pi.toCGFloat(), accuracy: cgEpsilon)

        XCTAssertEqualWithAccuracy(-CGFloat.pi, (-CGFloat.pi).toCGFloat(), accuracy: cgEpsilon)
        XCTAssertEqualWithAccuracy(-CGFloat(Float.pi), (-Float.pi).toCGFloat(), accuracy: cgEpsilon)
        XCTAssertEqualWithAccuracy(-CGFloat(Double.pi), (-Double.pi).toCGFloat(), accuracy: cgEpsilon)
        XCTAssertEqualWithAccuracy(-CGFloat(Float80.pi), (-Float80.pi).toCGFloat(), accuracy: cgEpsilon)

        XCTAssertEqual(CGFloat.infinity, CGFloat.infinity.toCGFloat())
        XCTAssertEqual(CGFloat(Float.infinity), Float.infinity.toCGFloat())
        XCTAssertEqual(CGFloat(Double.infinity), Double.infinity.toCGFloat())
