Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search

[REBOL] ROUND function (like TRUNC, FLOOR, etc...)

From: riusa:email:it at: 15-Feb-2002 13:55

Librarian comment

the round function is supplied as standard in REBOL 1.3 and later.

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: 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: