From: Paolo Bonzini Date: Tue, 15 Apr 2008 13:25:38 +0000 (+0200) Subject: fix typos in mathl X-Git-Tag: v0.1~7547 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=a5c02266250d51d94c137f4fca8bec8e7654ff8c;p=gnulib.git fix typos in mathl 2008-04-15 Paolo Bonzini * lib/tanl.c (kernel_tanl): Rename flag to invert, initialize it to 0. * lib/trigl.c (ieee754_rem_pio2l): Fix range checks. --- diff --git a/ChangeLog b/ChangeLog index e8b2c4de4..2ceaa9c24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-15 Paolo Bonzini + + * lib/tanl.c (kernel_tanl): Rename flag to invert, initialize it + to 0. + * lib/trigl.c (ieee754_rem_pio2l): Fix range checks. + 2008-04-14 Bruno Haible * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Fix underquoting of diff --git a/lib/tanl.c b/lib/tanl.c index 64a84b86f..11b63adfc 100644 --- a/lib/tanl.c +++ b/lib/tanl.c @@ -125,7 +125,7 @@ long double kernel_tanl (long double x, long double y, int iy) { long double z, r, v, w, s, u, u1; - int flag, sign; + int invert = 0, sign; sign = 1; if (x < 0) @@ -147,7 +147,7 @@ kernel_tanl (long double x, long double y, int iy) } if (x >= 0.6743316650390625) /* |x| >= 0.6743316650390625 */ { - flag = 1; + invert = 1; z = pio4hi - x; w = pio4lo - y; @@ -163,7 +163,7 @@ kernel_tanl (long double x, long double y, int iy) r = y + z * (s * r + y); r += TH * s; w = x + r; - if (flag) + if (invert) { v = (long double) iy; w = (v - 2.0 * (x - (w * w / (w + v) - r))); diff --git a/lib/trigl.c b/lib/trigl.c index ecdce321a..6f9dcf526 100644 --- a/lib/trigl.c +++ b/lib/trigl.c @@ -205,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; @@ -213,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; @@ -223,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;