lua-users home
lua-l archive

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

>Is this a bug in lua or in my C compiler (Gnu C)?
>   x = tonumber("FFFFFFFF",16)
>   print(x+1)
>   write(format("%d\n",x+1))
> What does yours do? 

My Linux gives


This seems correct, except that conversion from double to int does not work
well when the double value is too large (ie does not fit into an int).