[REBOL] ROUND function (like TRUNC, FLOOR, etc...)
From: riusa:email:it at: 15-Feb-2002 13:55
I'm developing a program in my company, and an engineer asked how I
round the numbers... but... I discovered (I'm still a newbie...) Rebol
has only TO-INTEGER function to round a number! No FLOOR, no CEIL, no
TRUNC!
And... how about Banker's algorithm to round numbers?
I made some tests: TO-INTEGER only trunc the value, not round it:
1.3 -> 1
2.7 -> 2
3.5 -> 3
Why rebol has not a function to make the round more flexible?
Bye!
--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f
Sponsor:
Andare in vacanza a Cortina o investire a lungo termine.
Con Domina Vacanze puoi fare le cose insieme, e risparmiando! Come?
Leggi qui.
Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=270&d=15-2
Librarian comment
the round function is supplied as standard in REBOL 1.3 and later.