xref: /haiku/src/system/libroot/posix/musl/math/fabsl.c (revision f504f61099b010fbfa94b1cc63d2e9072c7f7185)
1*f504f610SAugustin Cavalier #include "libm.h"
2*f504f610SAugustin Cavalier #if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
fabsl(long double x)3*f504f610SAugustin Cavalier long double fabsl(long double x)
4*f504f610SAugustin Cavalier {
5*f504f610SAugustin Cavalier 	return fabs(x);
6*f504f610SAugustin Cavalier }
7*f504f610SAugustin Cavalier #elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
fabsl(long double x)8*f504f610SAugustin Cavalier long double fabsl(long double x)
9*f504f610SAugustin Cavalier {
10*f504f610SAugustin Cavalier 	union ldshape u = {x};
11*f504f610SAugustin Cavalier 
12*f504f610SAugustin Cavalier 	u.i.se &= 0x7fff;
13*f504f610SAugustin Cavalier 	return u.f;
14*f504f610SAugustin Cavalier }
15*f504f610SAugustin Cavalier #endif
16