X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmath%2Ffabsl.c;fp=src%2Fmath%2Ffabsl.c;h=711d908a535f0da6eeaeec1a47e3cb7b423d8a9e;hb=b69f695acedd4ce2798ef9ea28d834ceccc789bd;hp=0000000000000000000000000000000000000000;hpb=d46cf2e14cc4df7cc75e77d7009fcb6df1f48a33;p=musl diff --git a/src/math/fabsl.c b/src/math/fabsl.c new file mode 100644 index 00000000..711d908a --- /dev/null +++ b/src/math/fabsl.c @@ -0,0 +1,15 @@ +#include "libm.h" +#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024 +long double fabsl(long double x) +{ + return fabs(x); +} +#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384 +long double fabsl(long double x) +{ + union ldshape u = {x}; + + u.bits.sign = 0; + return u.value; +} +#endif