]> git.eshelyaron.com Git - emacs.git/commit
Add bignum support to floor, ceiling, etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Aug 2018 02:23:45 +0000 (19:23 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 22 Aug 2018 02:24:38 +0000 (19:24 -0700)
commit30efb8ed6c0968ca486081112f8d4dc147af9e6c
treefa69cc32da7a493898e62d6d00e15326f7bedf07
parentc79444c5b7b8ead1ea98ed5603bf2a49c13dbf16
Add bignum support to floor, ceiling, etc.

Problem reported by Andy Moreton (Bug#32463#35 (d)).
* src/floatfns.c (rounding_driver): Change the signature
of the integer rounder to use mpz_t rather than EMACS_INT.
All uses changed.  Support bignums.
(ceiling2, floor2, truncate2, round2): Remove.
All uses changed to rounddiv_q or to a GMP library function.
(rounddiv_q): New function.
* test/src/floatfns-tests.el (bignum-round): New test.
src/floatfns.c
test/src/floatfns-tests.el