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

Go to the source code of this file.

Functions

float fabsf (float x)
 

Function Documentation

◆ fabsf()

float fabsf ( float  x)

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 }