lua-users home
lua-l archive

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


On Mon, Jun 8, 2015 at 10:12 PM, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> > By the way, there is a single case of wrong comparison with NaN:
> > print(1<<63 <= 0/0)  --> true
> > It is hardly dangerous, just curious (I'm not proposing to fix it).
> Thanks for the report. (Of course it must be fixed; it is a bug.)
(And it can be "dangerous": it is converting NaN to integer, which
can trap on some machines.)
Indeed, it is dangerous!
On some ARM-based systems with software FP emulation the conversion (long)NaN results in 0 instead on MIN_INTEGER