Arc Forumnew | comments | leaders | submitlogin
Is there a difference between round and roundup?
2 points by rincewind 6048 days ago | 2 comments
It seems unlikely.

   (some [isnt round._ roundup._] (map [- 50 (* 10 (rand))] (range 1 2000)))


4 points by eds 6048 days ago | link

  arc> (round 4.5)
  4
  arc> (roundup 4.5)
  5
Or said another way,

  arc> (map round (map [+ _ 1/2] '(0 1 2 3 4 5 6)))
  (0 2 2 4 4 6 6)
  arc> (map roundup (map [+ _ 1/2] '(0 1 2 3 4 5 6)))
  (1 2 3 4 5 6 7)

-----

2 points by rincewind 6047 days ago | link

Thank you!

I think the docstrings on anarki should say that round does unbiased rounding.

-----