[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: integer math
- From: John Mckenna <jmckenna@...>
- Date: Thu, 13 Dec 2001 09:50:57 -0000
>From: aircooledspeed [mailto:cpercival@interaxis.co.uk]
>My app will need quite a lot of integer math and I am worried about
>rounding errors. Its it posable to change LUA_NUM_TYPE to int? Any
>problems with that?
It shouldn't be necessary. Integer values (up to some very large limit -
much greater than int) are exactly representable in the format used by
double, so there will be no errors. You just have to remember to explicitly
round after every division.
-Virus scanned and cleared ok