lua-users home
lua-l archive

Re: Testing for NaN (yes, I know, it has been discussed ad nauseum...)

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


> tostring(n)? Though I'm seeing "-nan" for 0/0.
Interesting idea, but not very portable:
On GCC/Cygwin, I have
> print(0/0)
nan
On MSVC/Windows, I have however:
> print(0/0)
-1.#IND
In this last version, there is not even the letters "NaN" in the string!

AltStyle によって変換されたページ (->オリジナル) /