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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/math/s_ctanl.c b/math/s_ctanl.c
index 6ad1b75af4..1f927553fd 100644
--- a/math/s_ctanl.c
+++ b/math/s_ctanl.c
@@ -23,6 +23,13 @@
 #include <math_private.h>
 #include <float.h>
 
+/* To avoid spurious underflows, use this definition to treat IBM long
+   double as approximating an IEEE-style format.  */
+#if LDBL_MANT_DIG == 106
+# undef LDBL_EPSILON
+# define LDBL_EPSILON 0x1p-106L
+#endif
+
 __complex__ long double
 __ctanl (__complex__ long double x)
 {