[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LUA4.0 : Bug with maths
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sun, 10 Feb 2002 22:39:22 -0200
> double a = atof("NAN");
atof does not detect errors. tonumber does.
>$ ./t
>0 0 0 1 0 0
It seems that your atof accepts "NAN" and returns IEEE NaN.
In general, atof is not required by ANSI C to do so and will return 0 instead.
The output of your program would then be
0 1 1 0 1 0
which is what it does in my Linux.
--lhf