aboutsummaryrefslogtreecommitdiff
path: root/libquadmath/math/tanq.c
diff options
context:
space:
mode:
Diffstat (limited to 'libquadmath/math/tanq.c')
-rw-r--r--libquadmath/math/tanq.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libquadmath/math/tanq.c b/libquadmath/math/tanq.c
index 690d94b..d2864f6 100644
--- a/libquadmath/math/tanq.c
+++ b/libquadmath/math/tanq.c
@@ -12,9 +12,9 @@
/*
Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -99,8 +99,13 @@ __quadmath_kernel_tanq (__float128 x, __float128 y, int iy)
if ((ix | u.words32.w1 | u.words32.w2 | u.words32.w3
| (iy + 1)) == 0)
return one / fabsq (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 */
@@ -163,7 +168,7 @@ __quadmath_kernel_tanq (__float128 x, __float128 y, int iy)
/* tanq.c -- __float128 version of s_tan.c.
* Conversion to IEEE quad long double by Jakub Jelinek, jj@ultra.linux.cz.
*/
-
+
/* @(#)s_tan.c 5.1 93/09/24 */
/*
* ====================================================