Mercurial > emacs
changeset 23148:10e261360159
(arith_driver, float_arith_driver): Compute (- x) by
using negation, not subtraction; this makes a difference with
IEEE floating point arithmetic (and also if integer arithmetic
is ones' complement or signed-magnitude!).
author | Paul Eggert <eggert@twinsun.com> |
---|---|
date | Sat, 29 Aug 1998 17:57:22 +0000 |
parents | ad9732e88e90 |
children | 7385a4939c61 |
files | src/data.c |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/data.c Sat Aug 29 17:11:50 1998 +0000 +++ b/src/data.c Sat Aug 29 17:57:22 1998 +0000 @@ -2203,9 +2203,7 @@ { case Aadd: accum += next; break; case Asub: - if (!argnum && nargs != 1) - next = - next; - accum -= next; + accum = argnum ? accum - next : nargs == 1 ? - next : next; break; case Amult: accum *= next; break; case Adiv: @@ -2265,9 +2263,7 @@ accum += next; break; case Asub: - if (!argnum && nargs != 1) - next = - next; - accum -= next; + accum = argnum ? accum - next : nargs == 1 ? - next : next; break; case Amult: accum *= next;