Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
math.h File Reference
#include <openlibm_fenv.h>
#include <openlibm_math.h>
Include dependency graph for math.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef float float_t
 
typedef double double_t
 

Functions

double fabs (double)
 
float fabsf (float)
 

Typedef Documentation

◆ double_t

typedef double double_t

Definition at line 27 of file math.h.

◆ float_t

typedef float float_t

Definition at line 26 of file math.h.

Function Documentation

◆ fabs()

double fabs ( double  )

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:

◆ fabsf()

float fabsf ( float  )

Definition at line 4 of file fabsf.c.

5 {
6  union
7  {
8  float f;
9  uint32_t i;
10  } u = {x};
11  u.i &= 0x7fffffff;
12  return u.f;
13 }