summaryrefslogblamecommitdiff
path: root/src/math/fabsf.c
blob: 4efc8d686dcc49e9c4d1c1af5159f042bf5a90d5 (plain) (tree)
1
2
3
4
5
6
7
8
9

                   


                    


                                             
 
#include <math.h>
#include <stdint.h>

float fabsf(float x)
{
	union {float f; uint32_t i;} u = {x};
	u.i &= 0x7fffffff;
	return u.f;
}