(scm_round): Test for x already an integer, to avoid bad
authorKevin Ryde <user42@zip.com.au>
Wed, 21 Apr 2004 23:15:55 +0000 (23:15 +0000)
committerKevin Ryde <user42@zip.com.au>
Wed, 21 Apr 2004 23:15:55 +0000 (23:15 +0000)
commit6187f48b1ab32cbdd2f666ceeac44ce5db2700d0
tree7657ad9983cfd263e5820f5ce8d29b4ddc5bbe43
parent3229f68b5ae839715d8b27ac916259f4d4113804
(scm_round): Test for x already an integer, to avoid bad
rounding in x+0.5 when x is a big value already an integer.  In
certain hardware rounding cases x+0.5 can give an adjacent integer,
leading to that as the result, when we really just wanted x itself.
libguile/numbers.c