lua-users home
lua-l archive

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




On Friday, 9 December 2011, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> and the simple tests:
>>
>> >  print(2^3 - 8)
>> -1.7763568394003e-015
>> >  print(3^4 - 81)
>> 2.8421709430404e-014
>> > =2^4-16
>> -1.7763568394003e-015
>
> These all should be zero. It really seems that the 'pow' function
> from the C library is broken.
>
> -- Roberto
>
>

It is not broken yet produces results which are very close to zero which is all you can expect with floating point calculations.

Liam