[swift-users] Unsupported Float80 math functions and min/max behavior with Nan
Antonino Ficarra
antonino.ficarra at gmail.com
Fri May 26 05:02:50 CDT 2017
- Why Swift continues to not support Float80 math functions?
Example:
print("\( log( Float( 1.0 ) ) )")
print("\( log( Double( 1.0 ) ) )")
// print("\( log( Float80( 1.0 ) ) )") // don’t compile and logl is unavailable
- Why min and max continue to not act like fmin and fmax (IEEE 754 standard)?
Example:
print("\( min( Double.nan,0.0 ) )") // print nan (!)
print("\( min( 0.0,Double.nan ) )") // print 0.0
print("\( max( Double.nan,0.0 ) )") // print nan (!)
print("\( max( 0.0,Double.nan ) )") // print 0.0
print("\n")
print("\( fmin( Double.nan,0.0 ) )") // print 0.0
print("\( fmin( 0.0,Double.nan ) )") // print 0.0
print("\( fmax( Double.nan,0.0 ) )") // print 0.0
print("\( fmax( 0.0,Double.nan ) )") // print 0.0
More information about the swift-users
mailing list