Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Improve wording for the accuracy paragraph
  • Loading branch information
rhettinger committed Sep 6, 2020
commit b6ecce695e06d536ae333f8013b6bf511f95e9b2
13 changes: 7 additions & 6 deletions Modules/mathmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -2479,12 +2479,13 @@ This technique is used in Dekker's SQRT2 algorithm and again in
Borges' ALGORITHM 4 and 5.

Without proof for all cases, hypot() cannot claim to be always
correctly rounded. However, the accuracy of "h + x / (2.0 * h)" for
n <= 1000 is at least 100 bits prior to the final rounding step. [6]
Also, hypot() was tested against a Decimal implementation with prec=300.
After 100 million trials no incorrectly rounded examples were found.
In addition, perfect commutativity (all permutations are equal) was
verified for 1 billion random inputs with n=5. [7]
correctly rounded. However for n <= 1000, prior to the final addition
that rounds the overall result, the internal accuracy of "h" together
with its correction of "x / (2.0 * h)" is at least 100 bits. [6]
Also, hypot() was tested against a Decimal implementation with
prec=300. After 100 million trials, no incorrectly rounded examples
were found. In addition, perfect commutativity (all permutations are
exactly equal) was verified for 1 billion random inputs with n=5. [7]

References:

Expand Down