]> code.delx.au - gnu-emacs/commitdiff
[!HAVE_RINT] (rint): Convert macro to an actual
authorKarl Heuer <kwzh@gnu.org>
Sat, 25 Jan 1997 09:50:25 +0000 (09:50 +0000)
committerKarl Heuer <kwzh@gnu.org>
Sat, 25 Jan 1997 09:50:25 +0000 (09:50 +0000)
function, so we can take its address.

src/floatfns.c

index 1518006c5b22e3ec15044b070f553af1305df1b5..614506e7c4f7a2fcab4c6753b81736a34cb6b7b8 100644 (file)
@@ -123,10 +123,6 @@ extern int errno;
 #define sinh(x) ((exp(x)-exp(-x))*0.5)
 #endif /* VMS */
 
-#ifndef HAVE_RINT
-#define rint(x) (floor((x)+0.5))
-#endif
-
 static SIGTYPE float_error ();
 
 /* Nonzero while executing in floating point.
@@ -828,6 +824,15 @@ round2 (i1, i2)
   return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1);
 }
 
+#ifndef HAVE_RINT
+static double
+rint (d)
+     double d;
+{
+  return floor(d + 0.5);
+}
+#endif
+
 static double
 double_identity (d)
      double d;