Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
fabs.c
Go to the documentation of this file.
1 #include <math.h>
2 #include <stdint.h>
3 
4 double fabs(double x)
5 {
6  union
7  {
8  double f;
9  uint64_t i;
10  } u = {x};
11  u.i &= -1ULL / 2;
12  return u.f;
13 }
double fabs(double x)
Definition: fabs.c:4