ReactOS
0.4.16-dev-2216-ga08d639
Functions
fabs.c File Reference
#include <math.h>
Include dependency graph for fabs.c:
Go to the source code of this file.
Functions
_Check_return_
double
__cdecl
fabs
(
_In_
double
x
)
Function Documentation
◆
fabs()
_Check_return_
double
__cdecl
fabs
(
_In_
double
x
)
Definition at line
17
of file
fabs.c
.
19
{
20
/* Load the value as uint64 */
21
unsigned
long
long
u64
= *(
unsigned
long
long
*)&
x
;
22
23
/* Clear the sign bit */
24
u64
&= ~(1ULL << 63);
25
26
/* Check for NAN */
27
if
(
u64
> 0x7FF0000000000000ull)
28
{
29
#ifdef _M_IX86
30
/* Set error bit */
31
*(
unsigned
long
long
*)&
x
|= 0x0008000000000000ull;
32
#endif
33
return
x
;
34
}
35
36
/* Convert back to double */
37
return
*(
double
*)&
u64
;
38
}
u64
ULONG64 u64
Definition:
btrfs.h:15
x
GLint GLint GLint GLint GLint x
Definition:
gl.h:1548
sdk
lib
crt
math
fabs.c
Generated on Thu Jan 29 2026 06:26:20 for ReactOS by
1.9.6