Fiddle around with Mach-O

This commit is contained in:
Justine Tunney 2023-05-17 02:29:30 -07:00
parent 6881a2ecea
commit b852650c08
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
13 changed files with 343 additions and 85 deletions

View file

@ -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 */