diff options
Diffstat (limited to 'sysdeps/libm-ieee754/s_csinhl.c')
-rw-r--r-- | sysdeps/libm-ieee754/s_csinhl.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sysdeps/libm-ieee754/s_csinhl.c b/sysdeps/libm-ieee754/s_csinhl.c index 8388a40b46..4bb9e63680 100644 --- a/sysdeps/libm-ieee754/s_csinhl.c +++ b/sysdeps/libm-ieee754/s_csinhl.c @@ -41,9 +41,12 @@ __csinhl (__complex__ long double x) { /* Imaginary part is finite. */ long double sinh_val = __ieee754_sinhl (__real__ x); + long double sinix, cosix; - __real__ retval = sinh_val * __cosl (__imag__ x); - __imag__ retval = sinh_val * __sinl (__imag__ x); + __sincosl (__imag__ x, &sinix, &cosix); + + __real__ retval = sinh_val * cosix; + __imag__ retval = sinh_val * sinix; if (negate) __real__ retval = -__real__ retval; @@ -75,8 +78,12 @@ __csinhl (__complex__ long double x) else if (icls > FP_ZERO) { /* Imaginary part is finite. */ - __real__ retval = __copysignl (HUGE_VALL, __cosl (__imag__ x)); - __imag__ retval = __copysignl (HUGE_VALL, __sinl (__imag__ x)); + long double sinix, cosix; + + __sincosl (__imag__ x, &sinix, &cosix); + + __real__ retval = __copysignl (HUGE_VALL, cosix); + __imag__ retval = __copysignl (HUGE_VALL, sinix); if (negate) __real__ retval = -__real__ retval; |