mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Fiddle around with Mach-O
This commit is contained in:
parent
6881a2ecea
commit
b852650c08
13 changed files with 343 additions and 85 deletions
|
@ -33,7 +33,7 @@ asm(".ident\t\"\\n\\n\
|
|||
Musl libc (MIT License)\\n\
|
||||
Copyright 2005-2014 Rich Felker, et. al.\"");
|
||||
asm(".include \"libc/disclaimer.inc\"");
|
||||
/* clang-format off */
|
||||
// clang-format off
|
||||
|
||||
/* acosh(z) = i acos(z) */
|
||||
double complex cacosh(double complex z)
|
||||
|
@ -43,3 +43,7 @@ double complex cacosh(double complex z)
|
|||
if (zineg) return CMPLX(cimag(z), -creal(z));
|
||||
else return CMPLX(-cimag(z), creal(z));
|
||||
}
|
||||
|
||||
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
||||
__strong_reference(cacosh, cacoshl);
|
||||
#endif
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/complex.h"
|
||||
#include "libc/math.h"
|
||||
#if !(LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024)
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Musl libc (MIT License)\\n\
|
||||
|
@ -34,13 +35,12 @@ Copyright 2005-2014 Rich Felker, et. al.\"");
|
|||
asm(".include \"libc/disclaimer.inc\"");
|
||||
// clang-format off
|
||||
|
||||
long double complex cacoshl(long double complex z) {
|
||||
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
|
||||
return cacosh(z);
|
||||
#else
|
||||
long double complex cacoshl(long double complex z)
|
||||
{
|
||||
int zineg = signbit(cimagl(z));
|
||||
z = cacosl(z);
|
||||
if (zineg) return CMPLXL(cimagl(z), -creall(z));
|
||||
else return CMPLXL(-cimagl(z), creall(z));
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* long double is long */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue