(j3.2006) (SC22WG5.5785) [ukfortran] edits to clarify SQRTtreatment of negative zero, for comments
Cohen Malcolm
malcolm
Wed Aug 24 20:51:16 EDT 2016
>The real part of log of zero is well defined - it is minus infinity.
No, the log of real zero is not defined in maths, though it is in a
recommended (not mandatory) function in 60559.
60559 does not however define the log of complex zero. According to its
usual rules, one might expect (-INF,NaN).
>Hence exp( log(x) ) is also well defined - it is zero.
Actually that would be (NaN,NaN).
>3 out of 3 compilers agree with me
And a fourth produces
(-Infinity,NaN)
(NaN,NaN)
Anyway, compilers do not implement maths, nor are they are reliable guide to
the finer points of 60559.
Also, non-60559 machines exist and are still used, and their compilers
cannot agree with you.
>Perhaps [we should add more features]
Perhaps not at this time.
Cheers,
--
........................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list