lua-users home
lua-l archive

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


In coroutine.lua
print(string.format('%a',a)) --> 0x1.388000p+9

and the simple tests:

>  print(2^3 - 8)
-1.7763568394003e-015
>  print(3^4 - 81)
2.8421709430404e-014
> =2^4-16
-1.7763568394003e-015
> =2^4
16

Tymur

On 9 December 2011 12:45, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>> Ah, there're few more troubles with tdm64-gcc4.5.1:
>>
>> coroutine.lua
>> a = 625--line 189
>>
>> math.lua
>> a^b == 08 is false at line 8
>> also 56, 58, 69, 70, 71, 72, 73, 75, 117 and so on...
>>
>> I think there's something very wrong with this compiler...
>
> It seems that the 'pow' function is broken. Note that here,
>
>   2.8147497671066e+014  == 2.8147497671065e+014 also false (line 55)
>
> the results differ in the last bit. (The second number is the result
> of an exponentiation. The first result should be the expected value.)
>
> Probably that first 'a' is not actually 625, too. May you change that
> first test (coroutine.lua) to print 'a - 625' (or else to print 'a' with
> format "%a")? Or better yet, check the pow function with some simple
> tests?
>
>  print(2^3 - 8)
>  print(3^4 - 81)
>  ...)
>
> -- Roberto
>