(j3.2006) (SC22WG5.5301) [ukfortran] Did we intend to prohibit this?
Malcolm Cohen
malcolm
Thu Jul 3 20:37:12 EDT 2014
> integer, parameter :: RK = kind(1.0e0)
> real(rk), parameter :: SNaN = merge( IEEE_Value(1.0_rk,IEEE_Signaling_NaN), &
> & 0.0_rk, IEEE_Support_DataType(1.0_rk) )
This would in any case not be conforming when either IEEE_SUPPORT_DATATYPE is
false or IEEE_SUPPORT_NAN is false, since MERGE is not "short-cut" evaluation.
There are many traps and pitfalls associated with trying to use signalling NaN
in user code, especially in code that might be evaluated at compile-time. I
would not recommend embarking on such a journey.
Cheers,
--
................................Malcolm Cohen, Nihon NAG, Tokyo.
More information about the J3
mailing list