From 92a38c359c748628f33f1352675610755724dbc7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 29 Jan 1999 16:55:14 +0000 Subject: [PATCH] (__floor): Copy commentary from bits/mathinclude.h. Kill unused defines. --- sysdeps/alpha/fpu/s_floor.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sysdeps/alpha/fpu/s_floor.c b/sysdeps/alpha/fpu/s_floor.c index c7e14662fe2..146e19b35a1 100644 --- a/sysdeps/alpha/fpu/s_floor.c +++ b/sysdeps/alpha/fpu/s_floor.c @@ -17,18 +17,17 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __USE_EXTERN_INLINES -#define __USE_EXTERN_INLINES -#endif -#define __floor __i_floor - #include -#undef __floor + +/* Use the -inf rounding mode conversion instructions to implement + floor. We note when the exponent is large enough that the value + must be integral, as this avoids unpleasant integer overflows. */ double __floor (double x) { + /* Check not zero since floor(-0) == -0. */ if (x != 0 && fabs (x) < 9007199254740992.0) /* 1 << DBL_MANT_DIG */ { double __tmp1; -- 2.47.3