Skip to content

Commit 713a71f

Browse files
authored
Merge pull request #3541 from edstenson/review_modeling_floating_point
Updated language use in modeling-floating-point.md
2 parents 3980efa + b94479d commit 713a71f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

doc/cprover-manual/modeling-floating-point.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
The CPROVER tools support bit-accurate reasoning about IEEE-754
66
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
88
floating-point arithmetic:
99

1010
- CPROVER supports C99 Appendix F, and thus, the `__STD_IEC_559__`
@@ -39,11 +39,11 @@ floating-point arithmetic:
3939

4040
- Casts from int to float and float to float make use of the current
4141
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).
4343

4444
### x86 and Other Platform-specific Issues
4545

46-
Not all platforms have the same implementation-defined behaviour as
46+
Not all platforms have the same implementation-defined behavior as
4747
CPROVER. This can cause mismatches between the verification environment
4848
and the execution environment. If this occurs, check the compiler manual
4949
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`,
6666
which exclusively uses the x87 unit.
6767

6868
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
7070
optimisation levels enable transformations that are unsound with respect
7171
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
7373
`-ffast-math`). The options `-ffp-contract=off` (which replaces
7474
`-mno-fused-madd`), `-frounding-math` and `-fsignaling-nans` are needed
7575
for GCC to be strictly compliant with IEEE-754.
7676

7777
### Rounding Mode
7878

7979
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.
8181
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
8383
is needed, CPROVER has models of `fesetround` (for POSIX systems) and
8484
`_controlfp` (for Windows), which can be used to change the rounding
8585
mode during program execution. Furthermore, the inline assembly commands
@@ -91,7 +91,7 @@ this directly.
9191

9292
### Math Library
9393

94-
CPROVER implements some of `math.h`, including `fabs`, `fpclassify` and
94+
CPROVER implements some of `math.h`, including `fabs`, `fpclassify`, and
9595
`signbit`. It has very limited support for elementary functions. Care
9696
must be taken when verifying properties that are dependent on these
9797
functions as the accuracy of implementations can vary considerably. The
@@ -101,7 +101,7 @@ is unknown.
101101
### Fixed-point Arithmetic
102102

103103
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
105105
length of these types is platform specific. The upper half of each type
106106
is the integer component and the lower half is the fractional part.
107107

0 commit comments

Comments
 (0)