[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Is this a bug?
- From: Gavin Wraith <gavin@...>
- Date: Sun, 4 Feb 2001 23:06:00 +0000 (GMT)
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/