[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Re[2]: NaN in Lua 5.3 Reference Manual
- From: Sean Conner <sean@...>
- Date: Fri, 23 Jun 2017 14:49:26 -0400
It was thus said that the Great Coda Highland once stated:
>
> It actually DOESN'T have a unique bit pattern in IEEE-754. All
> IEEE-754 numbers with an exponent of all 1's is a NaN, and in fact
> some VMs (including LuaJIT) exploit this fact to pack 52 bits of
> useful information into the mantissa instead of storing it externally.
The exponent of all ones represents two concepts----if the mantissa (the
non-exponent portion) is all zeros, the number is +infinity (or -inifinity
if the sign bit is set). If the mantissa has any bit set (not all zeros) it
is then considered NaN.
-spc