add more tests for rounding

r7rs requires (round x) to round to even when x is halfway between
two integers, while C requires round(x) to round away from zero.
This commit is contained in:
Yorick Hardy 2024-02-01 22:23:16 +02:00
parent 3b921e7389
commit 7d8f70fb07

View file

@ -91,6 +91,9 @@
(test 4.0 (ceiling 3.5))
(test 3.0 (truncate 3.5))
(test 4.0 (round 3.5))
(test 2.0 (round 2.5))
(test -4.0 (round -3.5))
(test -2.0 (round -2.5))
(test 4.0 (round 7/2)) ;; Rationals not supported, so result is inexact
(test 7 (round 7))