summaryrefslogtreecommitdiff
path: root/src/math/fabs.c
blob: 6e28f1e51450f80459e31af6b124745e9189952a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#include "libm.h"

double fabs(double x)
{
	union dshape u;

	u.value = x;
	u.bits &= (uint64_t)-1 / 2;
	return u.value;
}