Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
fabs.c File Reference
#include <math.h>
#include <stdint.h>
Include dependency graph for fabs.c:

Go to the source code of this file.

Functions

double fabs (double x)
 

Function Documentation

◆ fabs()

double fabs ( double  x)

Definition at line 4 of file fabs.c.

5 {
6  union
7  {
8  double f;
9  uint64_t i;
10  } u = {x};
11  u.i &= -1ULL / 2;
12  return u.f;
13 }

Referenced by dtoa(), gdtoa(), and strtod().

Here is the caller graph for this function: