lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, Jun 23, 2017 at 1:49 PM, Sean Conner <sean@conman.org> wrote:
> 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
>
>

Oops. Thanks for the correction.

/s/ Adam