lua-users home
lua-l archive

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


* Ivo Beltchev:

> I have a special NaN to represent a NIL value - see my other thread
> "Comparing userdata with other types". My experiments show that it
> gets preserved by the FPU operations:
> Special_NaN+5=Special_NaN
> -Special_NaN=Special_NaN
>
> In your experience, do you think I can count on that?

The rules are specified in "Intel 64 and IA-32 Architectures Software
Developer's Manual Volume 1: Basic Architecture" (available from
<http://www.intel.com/products/processor/manuals/>).  If your code
requires just that, you should be fine.