xref: /haiku/src/system/libroot/posix/musl/math/fabs.c (revision a127b88ecbfab58f64944c98aa47722a18e363b2)
1 #include <math.h>
2 #include <stdint.h>
3 
4 double fabs(double x)
5 {
6 	union {double f; uint64_t i;} u = {x};
7 	u.i &= -1ULL/2;
8 	return u.f;
9 }
10