3 #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
4 long double tanhl(long double x)
8 #elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
9 long double tanhl(long double x)
13 struct{uint64_t m; uint16_t se; uint16_t pad;} i;
15 unsigned ex = u.i.se & 0x7fff;
16 unsigned sign = u.i.se & 0x8000;
25 if (ex > 0x3ffe || (ex == 0x3ffe && w > 0x8c9f53d5)) {
26 /* |x| > log(3)/2 ~= 0.5493 or nan */
29 t = 1 + 0/(x + 0x1p-120f);
34 } else if (ex > 0x3ffd || (ex == 0x3ffd && w > 0x82c577d4)) {
35 /* |x| > log(5/3)/2 ~= 0.2554 */