about summary refs log tree commit diff
path: root/math/s_ctanl.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_ctanl.c')
-rw-r--r--math/s_ctanl.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/math/s_ctanl.c b/math/s_ctanl.c
index 0fd0039053..48ab81b64b 100644
--- a/math/s_ctanl.c
+++ b/math/s_ctanl.c
@@ -117,6 +117,16 @@ __ctanl (__complex__ long double x)
 	  __real__ res = sinrx * cosrx / den;
 	  __imag__ res = sinhix * coshix / den;
 	}
+      if (fabsl (__real__ res) < LDBL_MIN)
+	{
+	  long double force_underflow = __real__ res * __real__ res;
+	  math_force_eval (force_underflow);
+	}
+      if (fabsl (__imag__ res) < LDBL_MIN)
+	{
+	  long double force_underflow = __imag__ res * __imag__ res;
+	  math_force_eval (force_underflow);
+	}
     }
 
   return res;