mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 06:48:31 +00:00
Get libc/tinymath/ compiling on aarch64
This commit is contained in:
parent
2b73e72d59
commit
135080fd3e
243 changed files with 7773 additions and 4027 deletions
|
@ -34,9 +34,13 @@ Copyright 2005-2014 Rich Felker, et. al.\"");
|
|||
asm(".include \"libc/disclaimer.inc\"");
|
||||
/* clang-format off */
|
||||
|
||||
/**
|
||||
* Returns inverse hyperbolic cosine of 𝑥.
|
||||
*/
|
||||
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
||||
long double acoshl(long double x)
|
||||
{
|
||||
return acosh(x);
|
||||
}
|
||||
#elif LDBL_MANT_DIG == 64 && LDBL_MAX_EXP == 16384
|
||||
/* acosh(x) = log(x + sqrt(x*x-1)) */
|
||||
long double acoshl(long double x)
|
||||
{
|
||||
union ldshape u = {x};
|
||||
|
@ -50,3 +54,10 @@ long double acoshl(long double x)
|
|||
return logl(2*x - 1/(x+sqrtl(x*x-1)));
|
||||
return logl(x) + 0.693147180559945309417232121458176568L;
|
||||
}
|
||||
#elif LDBL_MANT_DIG == 113 && LDBL_MAX_EXP == 16384
|
||||
// TODO: broken implementation to make things compile
|
||||
long double acoshl(long double x)
|
||||
{
|
||||
return acosh(x);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue