Re: checking for Not a Number?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: checking for Not a Number?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2006年12月20日 13:02:47 -0200
> So, can anybody weigh in on this? Is this a bug? If not, why not?
It is not a bug. On IEEE 754 hardware, you can have "numbers" x that do not
satisfy x==x:
% lua51
Lua 5.1.1 Copyright (C) 1994-2006 Lua.org, PUC-Rio
> x=math.log(-1)
> =x
nan
> = x==x
false
What compiler are you using?
--lhf