Changeset View
Changeset View
Standalone View
Standalone View
lib/msun/src/s_ctanhf.c
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Lines | if (ix & 0x7fffff) | ||||
return (CMPLXF(nan_mix(x, y), | return (CMPLXF(nan_mix(x, y), | ||||
y == 0 ? y : nan_mix(x, y))); | y == 0 ? y : nan_mix(x, y))); | ||||
SET_FLOAT_WORD(x, hx - 0x40000000); | SET_FLOAT_WORD(x, hx - 0x40000000); | ||||
return (CMPLXF(x, | return (CMPLXF(x, | ||||
copysignf(0, isinf(y) ? y : sinf(y) * cosf(y)))); | copysignf(0, isinf(y) ? y : sinf(y) * cosf(y)))); | ||||
} | } | ||||
if (!isfinite(y)) | if (!isfinite(y)) | ||||
return (CMPLXF(y - y, y - y)); | return (CMPLXF(ix ? y - y : x, y - y)); | ||||
if (ix >= 0x41300000) { /* |x| >= 11 */ | if (ix >= 0x41300000) { /* |x| >= 11 */ | ||||
float exp_mx = expf(-fabsf(x)); | float exp_mx = expf(-fabsf(x)); | ||||
return (CMPLXF(copysignf(1, x), | return (CMPLXF(copysignf(1, x), | ||||
4 * sinf(y) * cosf(y) * exp_mx * exp_mx)); | 4 * sinf(y) * cosf(y) * exp_mx * exp_mx)); | ||||
} | } | ||||
t = tanf(y); | t = tanf(y); | ||||
Show All 15 Lines |