RE: Uninitialized Variables
- Posted by Andy Serpa <renegade at earthling.net> Mar 23, 2002
- 440 views
> > This seems to work: > -------------- > atom x,nan,inf > inf = 1e300 * 1e300 > nan = inf / inf > > x = nan > > if x = nan then > puts(1, "x is not a number\n") > end if > ? x = nan > ? x != nan > Actually, it doesn't. Because (10 = nan) (2.3 = nan) will also evaluate as true and (10 != nan) will evaluate as false. You need to be able to tell a non-nan from a nan...