]> git.eshelyaron.com Git - emacs.git/commit
Fix double-rounding bug in ceiling etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Nov 2019 21:07:01 +0000 (13:07 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 13 Nov 2019 21:10:09 +0000 (13:10 -0800)
commitbede5984246ba734c93fc28148b5f8e1b14d30c5
treed5ec0482e1ed6b8dad42e65c9d9ea4eb2e2b75ff
parent02e637ecca3b1419d2a6c433eca72c5728c65051
Fix double-rounding bug in ceiling etc.

This is doable now that we have bignums.
* src/floatfns.c (integer_value): Remove; no longer used.
(rescale_for_division): New function.
(rounding_driver): Use it to divide properly (by using bignums)
even when arguments are float, fixing a double-rounding FIXME.
* src/lisp.h (LOG2_FLT_RADIX): Move here ...
* src/timefns.c (frac_to_double): ... from here.
* test/src/floatfns-tests.el (big-round):
Add a test to catch the double-rounding bug.
src/floatfns.c
src/lisp.h
src/timefns.c
test/src/floatfns-tests.el