Skip to content
Prev Previous commit
Next Next commit
Better wording for the incremental loop costs
  • Loading branch information
rhettinger committed Sep 6, 2020
commit 080c68a3748e701f65244f984a61e6eecbe0b2f7
5 changes: 3 additions & 2 deletions Modules/mathmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2458,8 +2458,9 @@ Since lo**2 is less than 1/2 ulp(csum), we have csum+lo*lo == csum.
To minimize loss of information during the accumulation of fractional
values, each term has a separate accumulator. This also breaks up
sequential dependencies in the inner loop so the CPU can maximize
floating point throughput. [5] On a 2.6 GHz Haswell, moving from
hypot(x,y) to hypot(x,y,z) costs only 5ns.
floating point throughput. [5] On a 2.6 GHz Haswell, adding one
dimension has an incremental cost of only 5ns -- for example when
moving from hypot(x,y) to hypot(x,y,z).

The square root differential correction is needed because a
correctly rounded square root of a correctly rounded sum of
Expand Down