diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-03-03 10:17:34 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-03-03 10:20:32 -0800 |
commit | 5e229f88f946c9c246966defeb629965f65d9549 (patch) | |
tree | 0eedf03cacff22c2cc3663975fe440be7d8c5a5b /lisp/emacs-lisp/cl-indent.el | |
parent | b28b7382e330621986c50c65a8285e7770b28bc4 (diff) | |
download | emacs-5e229f88f946c9c246966defeb629965f65d9549.tar.gz emacs-5e229f88f946c9c246966defeb629965f65d9549.tar.bz2 emacs-5e229f88f946c9c246966defeb629965f65d9549.zip |
Fix rounding errors in time conversion
* src/timefns.c (frac_to_double): Pass FLT_RADIX to mpz_sizeinbase
instead of doing the radix calculation ourselves, not always
correctly. Fix off-by-one error in scale, which caused
double-rounding.
(decode_time_components): Use frac_to_double (via decode_ticks_hz)
to fix double-rounding error that can occur even though
intermediate results are long double.
* test/src/timefns-tests.el (float-time-precision):
Test the above fixes.
Diffstat (limited to 'lisp/emacs-lisp/cl-indent.el')
0 files changed, 0 insertions, 0 deletions