aboutsummaryrefslogtreecommitdiffstats
path: root/src/floatfns.c
diff options
context:
space:
mode:
authorTom Tromey2013-01-05 19:36:45 -0700
committerTom Tromey2013-01-05 19:36:45 -0700
commite078a23febca14bc919c5806670479c395e3253e (patch)
treee9e4ed91feef744d525264c31974c3ed00146bcd /src/floatfns.c
parent63d535c829a930207b64fe733228f15a554644b1 (diff)
parent7a2657fa3bedbd977f4e11fe030cb4a210c04ab4 (diff)
downloademacs-e078a23febca14bc919c5806670479c395e3253e.tar.gz
emacs-e078a23febca14bc919c5806670479c395e3253e.zip
merge from trunk
Diffstat (limited to 'src/floatfns.c')
-rw-r--r--src/floatfns.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/floatfns.c b/src/floatfns.c
index 645a5957609..43576a16248 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -1,7 +1,7 @@
1/* Primitive operations on floating point for GNU Emacs Lisp interpreter. 1/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
2 2
3Copyright (C) 1988, 1993-1994, 1999, 2001-2012 3Copyright (C) 1988, 1993-1994, 1999, 2001-2013 Free Software Foundation,
4 Free Software Foundation, Inc. 4Inc.
5 5
6Author: Wolfgang Rupprecht 6Author: Wolfgang Rupprecht
7(according to ack.texi) 7(according to ack.texi)
@@ -399,8 +399,8 @@ round2 (EMACS_INT i1, EMACS_INT i2)
399 odd. */ 399 odd. */
400 EMACS_INT q = i1 / i2; 400 EMACS_INT q = i1 / i2;
401 EMACS_INT r = i1 % i2; 401 EMACS_INT r = i1 % i2;
402 EMACS_INT abs_r = r < 0 ? -r : r; 402 EMACS_INT abs_r = eabs (r);
403 EMACS_INT abs_r1 = (i2 < 0 ? -i2 : i2) - abs_r; 403 EMACS_INT abs_r1 = eabs (i2) - abs_r;
404 return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1); 404 return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1);
405} 405}
406 406