changeset 16929:a6b5ec9a51b4

[!HAVE_RINT] (rint): Convert macro to an actual function, so we can take its address.
author Karl Heuer <kwzh@gnu.org>
date Sat, 25 Jan 1997 09:50:25 +0000
parents 28186ed53849
children e1aba4a05388
files src/floatfns.c
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/floatfns.c	Sat Jan 25 06:47:28 1997 +0000
+++ b/src/floatfns.c	Sat Jan 25 09:50:25 1997 +0000
@@ -123,10 +123,6 @@
 #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 @@
   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;