Hi all! Swift.min (and Swift.max) propagates nan or not depending on the order of its args:
Swift.min(1.0, .nan) // 1.0 Swift.min(.nan, 1.0) // nan (!) Double.minimum(1.0, .nan) // 1.0 Double.minimum(.nan, 1.0) // 1.0 fmin(1.0, .nan) // 1.0 fmin(.nan, 1.0) // 1.0 The new static minimum and maximum funcs on FloatingPoint in Swift 3 shows the expected behaviour (ie the same as fmin, fmax and IEEE-754), so what should happen with Swift.min and Swift.max? Fix, remove or perhaps something else? https://bugs.swift.org/browse/SR-1011 /Jens
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
