| Index: fusl/src/complex/ctanhf.c
|
| diff --git a/fusl/src/complex/ctanhf.c b/fusl/src/complex/ctanhf.c
|
| index 72b76da075cf83f26a3ea7297af2d0e5e052b039..100fb2367b2c82ccfcd32050b465fc805d7fbb5e 100644
|
| --- a/fusl/src/complex/ctanhf.c
|
| +++ b/fusl/src/complex/ctanhf.c
|
| @@ -30,37 +30,36 @@
|
|
|
| #include "libm.h"
|
|
|
| -float complex ctanhf(float complex z)
|
| -{
|
| - float x, y;
|
| - float t, beta, s, rho, denom;
|
| - uint32_t hx, ix;
|
| +float complex ctanhf(float complex z) {
|
| + float x, y;
|
| + float t, beta, s, rho, denom;
|
| + uint32_t hx, ix;
|
|
|
| - x = crealf(z);
|
| - y = cimagf(z);
|
| + x = crealf(z);
|
| + y = cimagf(z);
|
|
|
| - GET_FLOAT_WORD(hx, x);
|
| - ix = hx & 0x7fffffff;
|
| + GET_FLOAT_WORD(hx, x);
|
| + ix = hx & 0x7fffffff;
|
|
|
| - if (ix >= 0x7f800000) {
|
| - if (ix & 0x7fffff)
|
| - return CMPLXF(x, (y == 0 ? y : x * y));
|
| - SET_FLOAT_WORD(x, hx - 0x40000000);
|
| - return CMPLXF(x, copysignf(0, isinf(y) ? y : sinf(y) * cosf(y)));
|
| - }
|
| + if (ix >= 0x7f800000) {
|
| + if (ix & 0x7fffff)
|
| + return CMPLXF(x, (y == 0 ? y : x * y));
|
| + SET_FLOAT_WORD(x, hx - 0x40000000);
|
| + return CMPLXF(x, copysignf(0, isinf(y) ? y : sinf(y) * cosf(y)));
|
| + }
|
|
|
| - if (!isfinite(y))
|
| - return CMPLXF(ix ? y - y : x, y - y);
|
| + if (!isfinite(y))
|
| + return CMPLXF(ix ? y - y : x, y - y);
|
|
|
| - if (ix >= 0x41300000) { /* x >= 11 */
|
| - float exp_mx = expf(-fabsf(x));
|
| - return CMPLXF(copysignf(1, x), 4 * sinf(y) * cosf(y) * exp_mx * exp_mx);
|
| - }
|
| + if (ix >= 0x41300000) { /* x >= 11 */
|
| + float exp_mx = expf(-fabsf(x));
|
| + return CMPLXF(copysignf(1, x), 4 * sinf(y) * cosf(y) * exp_mx * exp_mx);
|
| + }
|
|
|
| - t = tanf(y);
|
| - beta = 1.0 + t * t;
|
| - s = sinhf(x);
|
| - rho = sqrtf(1 + s * s);
|
| - denom = 1 + beta * s * s;
|
| - return CMPLXF((beta * rho * s) / denom, t / denom);
|
| + t = tanf(y);
|
| + beta = 1.0 + t * t;
|
| + s = sinhf(x);
|
| + rho = sqrtf(1 + s * s);
|
| + denom = 1 + beta * s * s;
|
| + return CMPLXF((beta * rho * s) / denom, t / denom);
|
| }
|
|
|