about summary refs log tree commit diff
path: root/math/s_ctanh.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_ctanh.c')
-rw-r--r--math/s_ctanh.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/math/s_ctanh.c b/math/s_ctanh.c
index 1347d07834..76a0501a73 100644
--- a/math/s_ctanh.c
+++ b/math/s_ctanh.c
@@ -110,6 +110,16 @@ __ctanh (__complex__ double x)
 	  __real__ res = sinhrx * coshrx / den;
 	  __imag__ res = sinix * cosix / den;
 	}
+      if (fabs (__real__ res) < DBL_MIN)
+	{
+	  double force_underflow = __real__ res * __real__ res;
+	  math_force_eval (force_underflow);
+	}
+      if (fabs (__imag__ res) < DBL_MIN)
+	{
+	  double force_underflow = __imag__ res * __imag__ res;
+	  math_force_eval (force_underflow);
+	}
     }
 
   return res;