diff options
author | Karl Heuer <kwzh@gnu.org> | 1997-01-25 09:50:25 +0000 |
---|---|---|
committer | Karl Heuer <kwzh@gnu.org> | 1997-01-25 09:50:25 +0000 |
commit | 4b5878a8c6ced525ba65623cbbfb59b4532a677e (patch) | |
tree | 48c622f035ebd4c647113f3a67eca3c820baa62b /src/floatfns.c | |
parent | 9a10bd0dc2f53ee16541cb3fc179c9c9e24dcf77 (diff) | |
download | emacs-4b5878a8c6ced525ba65623cbbfb59b4532a677e.tar.gz |
[!HAVE_RINT] (rint): Convert macro to an actual
function, so we can take its address.
Diffstat (limited to 'src/floatfns.c')
-rw-r--r-- | src/floatfns.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/floatfns.c b/src/floatfns.c index 1518006c5b2..614506e7c4f 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -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; |