X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Ftrigl.c;h=c82b509a3b57a6317a71e908bfb60ca91ac5102e;hb=5d0b385594bc914e6233988bfb6bc1b92a2184b5;hp=c2db23ee9c6191859ad0922a3b2ac28a6d059d46;hpb=267a39bafd249d7eb9c37df06dc6defcf41cb343;p=gnulib.git diff --git a/lib/trigl.c b/lib/trigl.c index c2db23ee9..c82b509a3 100644 --- a/lib/trigl.c +++ b/lib/trigl.c @@ -1,5 +1,5 @@ /* Quad-precision floating point argument reduction. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek @@ -17,10 +17,12 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ +#include + +/* Specification. */ #include -#include -#include "mathl.h" +#include /* Table of constants for 2/pi, 5628 hexadecimal digits of 2/pi */ static const int two_over_pi[] = { @@ -231,7 +233,7 @@ ieee754_rem_pio2l (long double x, long double *y) return -1; } - if (x + x == x || x != x) /* x is +=oo or NaN */ + if (x + x == x) /* x is ±oo */ { y[0] = x - x; y[1] = y[0]; @@ -421,7 +423,7 @@ static const double PIo2[] = { static const double zero = 0.0, one = 1.0, two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */ twon24 = 5.96046447753906250000e-08; /* 0x3E700000, 0x00000000 */ -int +static int kernel_rem_pio2 (double *x, double *y, int e0, int nx, int prec, const int *ipio2) {