[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: integer lua
- From: David Given <dg@...>
- Date: Wed, 24 Aug 2005 00:35:30 +0100
On Tuesday 23 August 2005 22:40, Shmuel Zeigerman wrote:
[...]
> math.floor(num+0.5)
That doesn't get the even-odd rounding rules correct, which are (IIRC)
mandatory for any financial work. (Of course, you're insane if you're using
floats for financial work anyway.) It'll always round 0.5, 1.5 etc up.
Adam Moss wrote:
> Neither function is part of ANSI C (C89), I believe.
However, they are in C99...
--
"Curses! Foiled by the chilled dairy treats of righteousness!" --- Earthworm
Jim (evil)
Attachment:
pgphpgKCnkX6h.pgp
Description: PGP signature