[Cfp-interest 2844] Re: The leading (or negative field) bit on a NaN

Damian McGuckin damianm at esi.com.au
Thu Aug 24 05:49:36 PDT 2023


Hi Mike,

On Thu, 24 Aug 2023, Mike Cowlishaw wrote:

> Technically its 'just another bit'.  However, in my testcases I treat 
> the payload of the NaN as being a signed integer having the value of the 
> significand and signed by treating that bit as a sign bit.  This to me, 
> is useful and unambiguous, and it also works for both decimal 
> significand codings..

I was looking at in the context of the projection of a complex number

 	x + I y

onto th eextended complex plane (as modelled by a Riemann sphere) of a 
complex number with an infinite part. This is the 'cproj' routine.

It returns

 	INFINOYI + I (+|-0.0)

where the sign of that zero is directly affected by the sign of 'y'.

However, I cannot see how, if 'y' is a NaN, that its payload details, 
specifically the 'sign' bit, should influence the sign of that 0.0.

Just curious.

Or is the reason definitional to provide reproducible results?

Thanks - Damian


More information about the Cfp-interest mailing list