diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-128/k_tanl.c')
-rw-r--r-- | sysdeps/ieee754/ldbl-128/k_tanl.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sysdeps/ieee754/ldbl-128/k_tanl.c b/sysdeps/ieee754/ldbl-128/k_tanl.c index dfba2d9a76..6bb221e4a6 100644 --- a/sysdeps/ieee754/ldbl-128/k_tanl.c +++ b/sysdeps/ieee754/ldbl-128/k_tanl.c @@ -56,6 +56,7 @@ * = 1 - 2*(tan(y) - (tan(y)^2)/(1+tan(y))) */ +#include <float.h> #include <libc-internal.h> #include <math.h> #include <math_private.h> @@ -98,8 +99,13 @@ __kernel_tanl (long double x, long double y, int iy) if ((ix | u.parts32.w1 | u.parts32.w2 | u.parts32.w3 | (iy + 1)) == 0) return one / fabs (x); + else if (iy == 1) + { + math_check_force_underflow (x); + return x; + } else - return (iy == 1) ? x : -one / x; + return -one / x; } } if (ix >= 0x3ffe5942) /* |x| >= 0.6743316650390625 */ @@ -135,11 +141,7 @@ __kernel_tanl (long double x, long double y, int iy) uninitialized although in the cases where it is used it has always been set. */ DIAG_PUSH_NEEDS_COMMENT; -#if __GNUC_PREREQ (4, 7) DIAG_IGNORE_NEEDS_COMMENT (5, "-Wmaybe-uninitialized"); -#else - DIAG_IGNORE_NEEDS_COMMENT (5, "-Wuninitialized"); -#endif if (sign < 0) w = -w; DIAG_POP_NEEDS_COMMENT; |