diff options
| author | Karl Heuer | 1997-01-25 09:50:25 +0000 |
|---|---|---|
| committer | Karl Heuer | 1997-01-25 09:50:25 +0000 |
| commit | 4b5878a8c6ced525ba65623cbbfb59b4532a677e (patch) | |
| tree | 48c622f035ebd4c647113f3a67eca3c820baa62b /src/floatfns.c | |
| parent | 9a10bd0dc2f53ee16541cb3fc179c9c9e24dcf77 (diff) | |
| download | emacs-4b5878a8c6ced525ba65623cbbfb59b4532a677e.tar.gz emacs-4b5878a8c6ced525ba65623cbbfb59b4532a677e.zip | |
[!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; | |||
| 123 | #define sinh(x) ((exp(x)-exp(-x))*0.5) | 123 | #define sinh(x) ((exp(x)-exp(-x))*0.5) |
| 124 | #endif /* VMS */ | 124 | #endif /* VMS */ |
| 125 | 125 | ||
| 126 | #ifndef HAVE_RINT | ||
| 127 | #define rint(x) (floor((x)+0.5)) | ||
| 128 | #endif | ||
| 129 | |||
| 130 | static SIGTYPE float_error (); | 126 | static SIGTYPE float_error (); |
| 131 | 127 | ||
| 132 | /* Nonzero while executing in floating point. | 128 | /* Nonzero while executing in floating point. |
| @@ -828,6 +824,15 @@ round2 (i1, i2) | |||
| 828 | return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1); | 824 | return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1); |
| 829 | } | 825 | } |
| 830 | 826 | ||
| 827 | #ifndef HAVE_RINT | ||
| 828 | static double | ||
| 829 | rint (d) | ||
| 830 | double d; | ||
| 831 | { | ||
| 832 | return floor(d + 0.5); | ||
| 833 | } | ||
| 834 | #endif | ||
| 835 | |||
| 831 | static double | 836 | static double |
| 832 | double_identity (d) | 837 | double_identity (d) |
| 833 | double d; | 838 | double d; |