ReactOS
0.4.16-dev-981-g80eb313
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
Functions
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
Variables
_
c
d
e
f
g
h
i
l
m
n
o
p
s
t
u
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
_
a
b
c
d
f
i
l
m
o
p
s
t
w
x
Enumerator
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
u
v
w
x
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
r
s
t
u
v
w
z
Enumerator
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Related Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
x
Files
File List
File Members
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Examples
fabs.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS CRT library
3
* LICENSE: MIT (https://spdx.org/licenses/MIT)
4
* PURPOSE: Portable implementation of fabs
5
* COPYRIGHT: Copyright 2021 Timo Kreuzer <timo.kreuzer@reactos.org>
6
*/
7
8
#include <math.h>
9
10
#ifdef _MSC_VER
11
#pragma function(fabs)
12
#endif
13
14
_Check_return_
15
double
16
__cdecl
17
fabs
(
18
_In_
double
x
)
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
}
__cdecl
#define __cdecl
Definition:
accygwin.h:79
u64
ULONG64 u64
Definition:
btrfs.h:15
x
GLint GLint GLint GLint GLint x
Definition:
gl.h:1548
fabs
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
Definition:
fabs.c:17
_Check_return_
#define _Check_return_
Definition:
no_sal2.h:60
_In_
#define _In_
Definition:
no_sal2.h:158
sdk
lib
crt
math
fabs.c
Generated on Tue Apr 15 2025 06:14:14 for ReactOS by
1.9.6