# HG changeset patch # User Paul Eggert # Date 904413442 0 # Node ID 10e26136015909f53d0a79b83efc89256e331fbf # Parent ad9732e88e9068077740e76d5683ca81c9195810 (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!). diff -r ad9732e88e90 -r 10e261360159 src/data.c --- 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;