aboutsummaryrefslogtreecommitdiff
path: root/math/s_clog10.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/s_clog10.c')
-rw-r--r--math/s_clog10.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/math/s_clog10.c b/math/s_clog10.c
index 417d56186c..e75787949f 100644
--- a/math/s_clog10.c
+++ b/math/s_clog10.c
@@ -25,6 +25,9 @@
/* log_10 (2). */
#define M_LOG10_2 0.3010299956639811952137388947244930267682
+/* pi * log10 (e). */
+#define M_PI_LOG10E 1.364376353841841347485783625431355770210
+
__complex__ double
__clog10 (__complex__ double x)
{
@@ -35,7 +38,7 @@ __clog10 (__complex__ double x)
if (__glibc_unlikely (rcls == FP_ZERO && icls == FP_ZERO))
{
/* Real and imaginary part are 0.0. */
- __imag__ result = signbit (__real__ x) ? M_PI : 0.0;
+ __imag__ result = signbit (__real__ x) ? M_PI_LOG10E : 0.0;
__imag__ result = __copysign (__imag__ result, __imag__ x);
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabs (__real__ x);