aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPaul Eggert2018-08-18 23:27:47 -0700
committerPaul Eggert2018-08-18 23:29:16 -0700
commit06b5bcd639bf97fc77dc89dd52f136d4f262e888 (patch)
tree4533e24794585504e3c5fce20f00fb873f1a0235 /test
parent351859238d8b72c514f6714bd0f6b4dd39941606 (diff)
downloademacs-06b5bcd639bf97fc77dc89dd52f136d4f262e888.tar.gz
emacs-06b5bcd639bf97fc77dc89dd52f136d4f262e888.zip
Fix bug with ‘mod’ and float+bignum
Problem reported by Andy Moreton in: https://lists.gnu.org/r/emacs-devel/2018-08/msg00442.html * src/floatfns.c (fmod_float): Work even if an arg is a bignum. * test/src/floatfns-tests.el (bignum-mod): New test.
Diffstat (limited to 'test')
-rw-r--r--test/src/floatfns-tests.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/src/floatfns-tests.el b/test/src/floatfns-tests.el
index 7714c05d60a..43a2e278290 100644
--- a/test/src/floatfns-tests.el
+++ b/test/src/floatfns-tests.el
@@ -46,4 +46,7 @@
46 (should (= (+ (logb most-positive-fixnum) 1) 46 (should (= (+ (logb most-positive-fixnum) 1)
47 (logb (+ most-positive-fixnum 1))))) 47 (logb (+ most-positive-fixnum 1)))))
48 48
49(ert-deftest bignum-mod ()
50 (should (= 0 (mod (1+ most-positive-fixnum) 2.0))))
51
49(provide 'floatfns-tests) 52(provide 'floatfns-tests)