summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPaul Eggert <eggert@Penguin.CS.UCLA.EDU>2018-09-13 14:28:56 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-09-13 14:29:58 -0700
commitc44bc4d370b38ac3e9da15579fd372d1410d4b4c (patch)
tree5f294fabb278e1e294f35852086637e6df859ed8 /test
parent755fa346eba212b4650c8541023bb78e1658d77b (diff)
downloademacs-c44bc4d370b38ac3e9da15579fd372d1410d4b4c.tar.gz
Fix (floor 54043195528445955 3.0) bug
* src/floatfns.c (rounding_driver): Fix rounding error that can occur when both args have values exactly representable as integers but at least one arg is a float. * test/src/floatfns-tests.el (big-round): New test.
Diffstat (limited to 'test')
-rw-r--r--test/src/floatfns-tests.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/src/floatfns-tests.el b/test/src/floatfns-tests.el
index 3dcddc7f26b..14576b603c0 100644
--- a/test/src/floatfns-tests.el
+++ b/test/src/floatfns-tests.el
@@ -109,4 +109,8 @@
(should-error (round n d))
(should-error (truncate n d)))))))
+(ert-deftest big-round ()
+ (should (= (floor 54043195528445955 3)
+ (floor 54043195528445955 3.0))))
+
(provide 'floatfns-tests)