ReactOS
0.4.16-dev-814-g656a5dc
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
ldexp.c
Go to the documentation of this file.
1
/*
2
* PROJECT: ReactOS CRT
3
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4
* PURPOSE: Implements the ldexp CRT function for IA-32 with Windows-compatible error codes.
5
* COPYRIGHT: Copyright 2010 Timo Kreuzer (timo.kreuzer@reactos.org)
6
* Copyright 2011 Pierre Schweitzer (pierre@reactos.org)
7
* Copyright 2019 Colin Finck (colin@reactos.org)
8
*/
9
10
#include <precomp.h>
11
12
double
ldexp
(
double
value
,
int
exp
)
13
{
14
#ifdef __GNUC__
15
register
double
result
;
16
#endif
17
18
/* Check for value correctness
19
* and set errno if required
20
*/
21
if
(
_isnan
(
value
))
22
{
23
errno
=
EDOM
;
24
}
25
26
#ifdef __GNUC__
27
asm
(
"fscale"
28
:
"=t"
(
result
)
29
:
"0"
(
value
),
"u"
((
double
)
exp
)
30
:
"1"
);
31
return
result
;
32
#else
/* !__GNUC__ */
33
__asm
34
{
35
fild
exp
36
fld
value
37
fscale
38
fstp st(1)
39
}
40
41
/* "fstp st(1)" has copied st(0) to st(1), then popped the FPU stack,
42
* so that the value is again in st(0) now. Effectively, we have reduced
43
* the FPU stack by one element while preserving st(0).
44
* st(0) is also the register used for returning a double value. */
45
#endif
/* !__GNUC__ */
46
}
EDOM
#define EDOM
Definition:
errno.h:39
result
GLuint64EXT * result
Definition:
glext.h:11304
ldexp
double ldexp(double value, int exp)
Definition:
ldexp.c:12
_isnan
_Check_return_ __MINGW_NOTHROW _CRTIMP int __cdecl _isnan(_In_ double)
double
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
Definition:
string.c:89
exp
DWORD exp
Definition:
msg.c:16058
errno
#define errno
Definition:
errno.h:18
value
Definition:
pdh_main.c:94
sdk
lib
crt
math
i386
ldexp.c
Generated on Thu Mar 13 2025 06:14:00 for ReactOS by
1.9.6