/* Primitive operations on floating point for GNU Emacs Lisp interpreter.
-Copyright (C) 1988, 1993-1994, 1999, 2001-2012
- Free Software Foundation, Inc.
+Copyright (C) 1988, 1993-1994, 1999, 2001-2013 Free Software Foundation,
+Inc.
Author: Wolfgang Rupprecht
(according to ack.texi)
#include <config.h>
#include "lisp.h"
-#include "syssignal.h"
-
-#include <float.h>
-#if (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
- && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
-#define IEEE_FLOATING_POINT 1
-#else
-#define IEEE_FLOATING_POINT 0
-#endif
#include <math.h>
odd. */
EMACS_INT q = i1 / i2;
EMACS_INT r = i1 % i2;
- EMACS_INT abs_r = r < 0 ? -r : r;
- EMACS_INT abs_r1 = (i2 < 0 ? -i2 : i2) - abs_r;
+ EMACS_INT abs_r = eabs (r);
+ EMACS_INT abs_r1 = eabs (i2) - abs_r;
return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1);
}