     || (abs(value1 - value2) > accuracy)
 }
 
+func _XCTCheckNotEqualWithAccuracy_CGFloat(value1: CGFloat, value2: CGFloat, accuracy: CGFloat) -> Bool {
+  return (value1.isNaN || value2.isNaN)
+    || (abs(value1 - value2) > accuracy)
+}
+
 public func XCTAssertNotEqualWithAccuracy<T: FloatingPointType>(expression1: @autoclosure () -> T, expression2: @autoclosure () -> T, accuracy: T, _ message: String = "", file: String = __FILE__, line: UInt = __LINE__) -> Void {
   let assertionType = _XCTAssertionType.NotEqualWithAccuracy
   

    && (abs(value1 - value2) <= accuracy)
}

public func XCTAssertEqualWithAccuracy<T: FloatingPointType>(expression1: @autoclosure () -> T, expression2: @autoclosure () -> T, accuracy: T, _ message: String = "", file: String = __FILE__, line: UInt = __LINE__) -> Void {
  let assertionType = _XCTAssertionType.EqualWithAccuracy
  

  case let (expressionValue1Float as Float, expressionValue2Float as Float, accuracyFloat as Float):
    notEqualWithAccuracy = _XCTCheckNotEqualWithAccuracy_Float(expressionValue1Float, expressionValue2Float, accuracyFloat)
    
  case let (expressionValue1CGFloat as CGFloat, expressionValue2CGFloat as CGFloat, accuracyCGFloat as CGFloat):
    notEqualWithAccuracy = _XCTCheckNotEqualWithAccuracy_CGFloat(expressionValue1CGFloat, expressionValue2CGFloat, accuracyCGFloat)
    
  default:
    // unknown type, fail with prejudice
    _preconditionFailure("unsupported floating-point type passed to XCTAssertNotEqualWithAccuracy")
