aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorPaul Eggert2019-08-20 17:34:03 -0700
committerPaul Eggert2019-08-20 17:36:46 -0700
commit396ed88a50fba95cd3b989965defef0130a42c42 (patch)
tree95b03c537acf8d65b6d894a283eccf9f1d31a1e8 /etc
parent7e2090ee80c9099ee953392444e1d73d10e973d4 (diff)
downloademacs-396ed88a50fba95cd3b989965defef0130a42c42.tar.gz
emacs-396ed88a50fba95cd3b989965defef0130a42c42.zip
Avoid some excess precision in time arithmetic
* doc/misc/emacs-mime.texi (time-date): Adjust example to match new behavior. * etc/NEWS: Mention this. * lisp/calendar/time-date.el (decoded-time-add) (decoded-time--alter-second): Don’t lose underestimate precision of seconds component. * src/bignum.c (mpz): Grow by 1. * src/timefns.c (trillion_factor): New function. (timeform_sub_ps_p): Remove. (time_arith): Avoid unnecessarily-large hz, by reducing the hz to a value no worse than the worse hz of the two arguments. The result is always exact unless an error is signaled. * test/src/timefns-tests.el (timefns-tests--decode-time): New function. (format-time-string-with-zone): Test (decode-time LOOK ZONE t) resolution as well as its numeric value.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS4
1 files changed, 3 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 9f25cf4af51..3fdc185af4f 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2166,7 +2166,9 @@ end and duration).
2166+++ 2166+++
2167*** 'time-add', 'time-subtract', and 'time-less-p' now accept 2167*** 'time-add', 'time-subtract', and 'time-less-p' now accept
2168infinities and NaNs too, and propagate them or return nil like 2168infinities and NaNs too, and propagate them or return nil like
2169floating-point operators do. 2169floating-point operators do. If both arguments are finite, these
2170functions now return exact results instead of rounding in some cases,
2171and they also avoid excess precision when that is easy.
2170 2172
2171+++ 2173+++
2172*** New function 'time-equal-p' compares time values for equality. 2174*** New function 'time-equal-p' compares time values for equality.