Skip to content

Commit

Permalink
Correct rounding mode note
Browse files Browse the repository at this point in the history
The standard *does* specify that round-half-to-even is supposed to be the default, but no-one cares in practice
  • Loading branch information
Mabi19 committed Nov 8, 2024
1 parent 2fff0d8 commit 2119990
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions content.html
Original file line number Diff line number Diff line change
Expand Up @@ -420,9 +420,8 @@ <h2>Handling math with varying precision</h2>
<p>
The obvious solution to that is rounding: after each mathematical operation, if the result does not have a bit pattern in our system,
it snaps to the closest available value.
(Modern processors allow programs to choose the rounding mode, but
<a href="https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even">rounding half to even</a> is most common, as it minimizes
error accumulation)
(The default rounding mode is supposed to be <a href="https://en.wikipedia.org/wiki/Rounding#Rounding_half_to_even">rounding half to even</a>,
as it minimizes error accumulation - but most CPUs use round-to-nearest by default anyway.)
</p>
<p>
Notice that now, each bit pattern actually represents a range of values &mdash;
Expand Down

0 comments on commit 2119990

Please sign in to comment.