about summary refs log tree commit diff
path: root/math/s_ctanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_ctanf.c')
-rw-r--r--math/s_ctanf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/math/s_ctanf.c b/math/s_ctanf.c
index e0a6b8f07c..683ab6e544 100644
--- a/math/s_ctanf.c
+++ b/math/s_ctanf.c
@@ -110,6 +110,16 @@ __ctanf (__complex__ float x)
 	  __real__ res = sinrx * cosrx / den;
 	  __imag__ res = sinhix * coshix / den;
 	}
+      if (fabsf (__real__ res) < FLT_MIN)
+	{
+	  float force_underflow = __real__ res * __real__ res;
+	  math_force_eval (force_underflow);
+	}
+      if (fabsf (__imag__ res) < FLT_MIN)
+	{
+	  float force_underflow = __imag__ res * __imag__ res;
+	  math_force_eval (force_underflow);
+	}
     }
 
   return res;