4
4
5
5
The CPROVER tools support bit-accurate reasoning about IEEE-754
6
6
floating-point and fixed-point arithmetic. The C standard contains a
7
- number of areas of implementation-defined behaviour with regard to
7
+ number of areas of implementation-defined behavior with regard to
8
8
floating-point arithmetic:
9
9
10
10
- CPROVER supports C99 Appendix F, and thus, the ` __STD_IEC_559__ `
@@ -39,11 +39,11 @@ floating-point arithmetic:
39
39
40
40
- Casts from int to float and float to float make use of the current
41
41
rounding mode. Note that the standard requires that casts from float
42
- to int use round-to-zero (i.e. truncation).
42
+ to int use round-to-zero (that is, truncation).
43
43
44
44
### x86 and Other Platform-specific Issues
45
45
46
- Not all platforms have the same implementation-defined behaviour as
46
+ Not all platforms have the same implementation-defined behavior as
47
47
CPROVER. This can cause mismatches between the verification environment
48
48
and the execution environment. If this occurs, check the compiler manual
49
49
for the choices listed above. There are two common cases that can cause
@@ -66,20 +66,20 @@ use the SSE/SSE2 instructions" and is thus better than `/arch:IA32`,
66
66
which exclusively uses the x87 unit.
67
67
68
68
The other common cause of discrepancy between CPROVER results and the
69
- actual platform are the use of unsafe optimisations . Some higher
69
+ actual platform are the use of unsafe optimizations . Some higher
70
70
optimisation levels enable transformations that are unsound with respect
71
71
to the IEEE-754 standard. Consult the compiler manual and disable any
72
- optimisations that are described as unsafe (for example, the GCC options
72
+ optimizations that are described as unsafe (for example, the GCC options
73
73
` -ffast-math ` ). The options ` -ffp-contract=off ` (which replaces
74
74
` -mno-fused-madd ` ), ` -frounding-math ` and ` -fsignaling-nans ` are needed
75
75
for GCC to be strictly compliant with IEEE-754.
76
76
77
77
### Rounding Mode
78
78
79
79
CPROVER supports the four rounding modes given by IEEE-754 1985; round
80
- to nearest (ties to even), round up, round down and round towards zero.
80
+ to nearest (ties to even), round up, round down, and round towards zero.
81
81
By default, round to nearest is used. However, command line options
82
- (` --round-to-zero ` , etc. ) can be used to over-ride this. If more control
82
+ (` --round-to-zero ` , and so on ) can be used to override this. If more control
83
83
is needed, CPROVER has models of ` fesetround ` (for POSIX systems) and
84
84
` _controlfp ` (for Windows), which can be used to change the rounding
85
85
mode during program execution. Furthermore, the inline assembly commands
@@ -91,7 +91,7 @@ this directly.
91
91
92
92
### Math Library
93
93
94
- CPROVER implements some of ` math.h ` , including ` fabs ` , ` fpclassify ` and
94
+ CPROVER implements some of ` math.h ` , including ` fabs ` , ` fpclassify ` , and
95
95
` signbit ` . It has very limited support for elementary functions. Care
96
96
must be taken when verifying properties that are dependent on these
97
97
functions as the accuracy of implementations can vary considerably. The
@@ -101,7 +101,7 @@ is unknown.
101
101
### Fixed-point Arithmetic
102
102
103
103
CPROVER also has support for fixed-point types. The ` --fixedbv ` flag
104
- switches ` float ` , ` double ` and ` long double ` to fixed-point types. The
104
+ switches ` float ` , ` double ` , and ` long double ` to fixed-point types. The
105
105
length of these types is platform specific. The upper half of each type
106
106
is the integer component and the lower half is the fractional part.
107
107
0 commit comments