[swift-evolution] Fix or remove Swift.min and Swift.max?
Jens Persson
jens at bitcycle.com
Tue Jun 28 16:29:03 CDT 2016
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160628/b8491080/attachment.html>
More information about the swift-evolution
mailing list