X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Ftrigl.c;h=6f9dcf526568adf55b6ef5955057fbbbc30db653;hb=217969cf220de4c0515eccd614de1640c3f46bcf;hp=c82b509a3b57a6317a71e908bfb60ca91ac5102e;hpb=55eed6bbc87934f2db04981e6f0f1773ff77974f;p=gnulib.git diff --git a/lib/trigl.c b/lib/trigl.c index c82b509a3..6f9dcf526 100644 --- a/lib/trigl.c +++ b/lib/trigl.c @@ -3,19 +3,18 @@ This file is part of the GNU C Library. Contributed by Jakub Jelinek - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2, or (at your option) - any later version. + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ #include @@ -206,7 +205,7 @@ ieee754_rem_pio2l (long double x, long double *y) int exp, n; if (x >= -0.78539816339744830961566084581987572104929234984377 - && x < 0.78539816339744830961566084581987572104929234984377) + && x <= 0.78539816339744830961566084581987572104929234984377) /* x in <-pi/4, pi/4> */ { y[0] = x; @@ -214,9 +213,7 @@ ieee754_rem_pio2l (long double x, long double *y) return 0; } - if (x >= 2.35619449019234492884698253745962716314787704953131 - && x < 2.35619449019234492884698253745962716314787704953131) - if (x > 0) + if (x > 0 && x < 2.35619449019234492884698253745962716314787704953131) { /* 113 + 93 bit PI is ok */ z = x - PI_2_1; @@ -224,7 +221,8 @@ ieee754_rem_pio2l (long double x, long double *y) y[1] = (z - y[0]) - PI_2_1t; return 1; } - else + + if (x < 0 && x > -2.35619449019234492884698253745962716314787704953131) { /* 113 + 93 bit PI is ok */ z = x + PI_2_1;