summaryrefslogtreecommitdiff
path: root/src/math/atanhl.c
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2013-09-04 15:54:02 +0000
committerSzabolcs Nagy <nsz@port70.net>2013-09-05 11:30:08 +0000
commitaa0c4a204e28cfc90a9ee955691a6cbe014c9fde (patch)
treee75c43e934d087e203dc999ba75168ee78e6ee7b /src/math/atanhl.c
parent2eaed464e2080d8321d3903b71086a1ecfc4ee4a (diff)
downloadmusl-aa0c4a204e28cfc90a9ee955691a6cbe014c9fde.tar.gz
math: long double fix (use ldshape union)
* use new ldshape union consistently * add ld128 support to frexpl * simplify sqrtl comment (ld64 is not just arm)
Diffstat (limited to 'src/math/atanhl.c')
-rw-r--r--src/math/atanhl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/math/atanhl.c b/src/math/atanhl.c
index b4c5e58b..72a1e345 100644
--- a/src/math/atanhl.c
+++ b/src/math/atanhl.c
@@ -9,10 +9,7 @@ long double atanhl(long double x)
/* atanh(x) = log((1+x)/(1-x))/2 = log1p(2x/(1-x))/2 ~= x + x^3/3 + o(x^5) */
long double atanhl(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 e = u.i.se & 0x7fff;
unsigned s = u.i.se >> 15;