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)?
Try
   x = tonumber("FFFFFFFF",16)
   print(x+1)
   write(format("%d\n",x+1))

For me it gives
   4294967296
   Uncaught trap: Floating point exception

In my view it ought to truncate gracefully and give
   4294967296
   0
 
 What does yours do? 
-- 
Gavin Wraith (gavin@wraith.u-net.com) or (gavinw@sussex.ac.uk)
Home page: http://www.wraith.u-net.com/