projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix failure to flush stderr when fflush(0) is called
[musl]
/
src
/
math
/
asinhl.c
diff --git
a/src/math/asinhl.c
b/src/math/asinhl.c
index
db96624
..
8635f52
100644
(file)
--- a/
src/math/asinhl.c
+++ b/
src/math/asinhl.c
@@
-9,10
+9,7
@@
long double asinhl(long double x)
/* asinh(x) = sign(x)*log(|x|+sqrt(x*x+1)) ~= x - x^3/6 + o(x^5) */
long double asinhl(long double x)
{
/* asinh(x) = sign(x)*log(|x|+sqrt(x*x+1)) ~= x - x^3/6 + o(x^5) */
long double asinhl(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;
unsigned e = u.i.se & 0x7fff;
unsigned s = u.i.se >> 15;
@@
-31,8
+28,14
@@
long double asinhl(long double x)
x = log1pl(x + x*x/(sqrtl(x*x+1)+1));
} else {
/* |x| < 0x1p-32, raise inexact if x!=0 */
x = log1pl(x + x*x/(sqrtl(x*x+1)+1));
} else {
/* |x| < 0x1p-32, raise inexact if x!=0 */
- FORCE_EVAL(x + 0x1p1
000
);
+ FORCE_EVAL(x + 0x1p1
20f
);
}
return s ? -x : x;
}
}
return s ? -x : x;
}
+#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
+// TODO: broken implementation to make things compile
+long double asinhl(long double x)
+{
+ return asinh(x);
+}
#endif
#endif