diff options
Diffstat (limited to 'math/s_csqrtl.c')
-rw-r--r-- | math/s_csqrtl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/math/s_csqrtl.c b/math/s_csqrtl.c index a0252e644a..003d614f60 100644 --- a/math/s_csqrtl.c +++ b/math/s_csqrtl.c @@ -148,6 +148,17 @@ __csqrtl (__complex__ long double x) s = __scalbnl (s, scale); } + if (fabsl (r) < LDBL_MIN) + { + long double force_underflow = r * r; + math_force_eval (force_underflow); + } + if (fabsl (s) < LDBL_MIN) + { + long double force_underflow = s * s; + math_force_eval (force_underflow); + } + __real__ res = r; __imag__ res = __copysignl (s, __imag__ x); } |