CBMC
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
c
d
e
f
g
j
l
m
r
t
w
Functions
a
c
d
f
g
r
t
w
Typedefs
Enumerations
Classes
Class List
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
i
k
l
m
o
p
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
Related Symbols
b
c
d
e
g
i
j
m
n
o
s
t
u
v
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
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
w
y
Typedefs
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
_
a
b
c
d
f
g
i
l
m
p
r
s
t
u
v
w
Enumerator
_
a
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
fenv.c
Go to the documentation of this file.
1
/* FUNCTION: fegetround */
2
3
#include <fenv.h>
4
5
extern
int
__CPROVER_rounding_mode
;
6
7
int
fegetround
(
void
)
8
{
9
__CPROVER_HIDE
:;
10
// CPROVER uses the x86 numbering of the rounding modes
11
return
12
#ifdef FE_DOWNWARD
13
__CPROVER_rounding_mode
==1?
FE_DOWNWARD
:
14
#endif
15
__CPROVER_rounding_mode
==0?
FE_TONEAREST
:
16
__CPROVER_rounding_mode
==3?
FE_TOWARDZERO
:
17
#ifdef FE_UPWARD
18
__CPROVER_rounding_mode
==2?
FE_UPWARD
:
19
#endif
20
-1;
21
}
7
int
fegetround
(
void
) {
…
}
22
23
/* FUNCTION: fesetround */
24
25
#include <fenv.h>
26
27
int
fesetround
(
int
rounding_mode)
28
{
29
__CPROVER_HIDE
:;
30
// CPROVER uses the x86 numbering of the rounding modes
31
__CPROVER_rounding_mode
=
32
#ifdef FE_DOWNWARD
33
rounding_mode==
FE_DOWNWARD
?1:
34
#endif
35
rounding_mode==
FE_TONEAREST
?0:
36
rounding_mode==
FE_TOWARDZERO
?3:
37
#ifdef FE_UPWARD
38
rounding_mode==
FE_UPWARD
?2:
39
#endif
40
0;
41
return
0;
// we never fail
42
}
27
int
fesetround
(
int
rounding_mode) {
…
}
43
44
/* FUNCTION: feraiseexcept */
45
46
int
feraiseexcept
(
int
excepts
)
47
{
48
__CPROVER_HIDE
:;
49
__CPROVER_assert
(
excepts
== 0,
"floating-point exception"
);
50
return
0;
// we never fail
51
}
46
int
feraiseexcept
(
int
excepts
) {
…
}
ait
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition
ai.h:562
__CPROVER_assert
void __CPROVER_assert(__CPROVER_bool assertion, const char *description)
fesetround
int fesetround(int rounding_mode)
Definition
fenv.c:27
__CPROVER_rounding_mode
int __CPROVER_rounding_mode
Definition
math.c:1521
feraiseexcept
int feraiseexcept(int excepts)
Definition
fenv.c:46
fegetround
int fegetround(void)
Definition
fenv.c:7
src
ansi-c
library
fenv.c
Generated by
1.9.8