10 lines
135 B
C
10 lines
135 B
C
#include <math.h>
|
|
#include <stdint.h>
|
|
|
|
double fabs(double x)
|
|
{
|
|
union {double f; uint64_t i;} u = {x};
|
|
u.i &= -1ULL/2;
|
|
return u.f;
|
|
}
|