Built-in testing for signaling nan?
Joseph S. Myers
joseph@codesourcery.com
Wed Nov 6 17:26:00 GMT 2013
On Wed, 6 Nov 2013, N.M. Maclaren wrote:
> Yes, due to the poor quality of the IEEE 754 specifications. In 1984,
> the distinction was left completely unspecified (even in intent). In
> 2008, there is a recommendation (no more) that the top bit of the payload
> is used, with no specification of what to do if that is zero (which is
> the most obvious default). That appears to be the Intel specification,
> though it may not have always been so even for x86. I have certainly
> seen more than one convention for different architectures, but have no
> idea how many are extant nor how many are documented in the relevant
> architecture manuals.
In GCC, the qnan_msb_set bit of struct real_format is what specifies the
convention in use for a particular floating-point mode.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Fortran
mailing list