ReactOS 0.4.15-dev-7953-g1f49173
fabsf.c File Reference
#include <math.h>
Include dependency graph for fabsf.c:

Go to the source code of this file.

Functions

_Check_return_ float __cdecl fabsf (_In_ float x)
 

Function Documentation

◆ fabsf()

Definition at line 13 of file fabsf.c.

15{
16 /* Load the value as uint */
17 unsigned int u32 = *(unsigned int*)&x;
18
19 /* Clear the sign bit */
20 u32 &= ~(1 << 31);
21
22 /* Check for NAN */
23 if (u32 > 0x7F800000)
24 {
25 /* Set error bit */
26 *(unsigned int*)&x |= 0x00400000;
27 return x;
28 }
29
30 /* Convert back to float */
31 return *(float*)&u32;
32}
ULONG32 u32
Definition: btrfs.h:14
GLint GLint GLint GLint GLint x
Definition: gl.h:1548