X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Ftanhl.c;h=4e1aa9f87dde30bc14f43bed200fe2a968e45108;hb=246f1c811448f37a44b41cd8df8d0ef9736d95f4;hp=66559e9fb005886564f220624d1d463518426fb0;hpb=e42a977fe5dbe48ba45072ab82886e6b5a694487;p=musl diff --git a/src/math/tanhl.c b/src/math/tanhl.c index 66559e9f..4e1aa9f8 100644 --- a/src/math/tanhl.c +++ b/src/math/tanhl.c @@ -8,10 +8,7 @@ long double tanhl(long double x) #elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384 long double tanhl(long double x) { - union { - long double f; - struct{uint64_t m; uint16_t se; uint16_t pad;} i; - } u = {.f = x}; + union ldshape u = {x}; unsigned ex = u.i.se & 0x7fff; unsigned sign = u.i.se & 0x8000; uint32_t w; @@ -42,4 +39,10 @@ long double tanhl(long double x) } return sign ? -t : t; } +#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384 +// TODO: broken implementation to make things compile +long double tanhl(long double x) +{ + return tanh(x); +} #endif