summaryrefslogtreecommitdiff
path: root/Modules/mathmodule.c
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2020-08-26 13:09:40 -0700
committerGitHub <noreply@github.com>2020-08-26 13:09:40 -0700
commit82e79480d6e61940d7007d9026fbff0b1a11ad9a (patch)
tree17d107292c070e1eeb3474a6b842ae889eeb0cac /Modules/mathmodule.c
parent31967fd8d0220af84e2698172d1378bffc8cd851 (diff)
downloadcpython-git-82e79480d6e61940d7007d9026fbff0b1a11ad9a.tar.gz
Fix typos in comment (GH-21966)
Diffstat (limited to 'Modules/mathmodule.c')
-rw-r--r--Modules/mathmodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 1d61741328..1704d8efd3 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -2440,7 +2440,7 @@ addend should be in the range: 0.5 <= |x| <= 1.0. Accordingly,
scaling or division by *max* should not be skipped even if not
otherwise needed to prevent overflow or loss of precision.
-The assertion that hi*hi >= 1.0 is a bit subtle. Each vector element
+The assertion that hi*hi <= 1.0 is a bit subtle. Each vector element
gets scaled to a magnitude below 1.0. The Veltkamp-Dekker splitting
algorithm gives a *hi* value that is correctly rounded to half
precision. When a value at or below 1.0 is correctly rounded, it
@@ -2458,7 +2458,7 @@ The correction is the first order term of the Maclaurin series
expansion of sqrt(h**2 + x) == h + x/(2*h) + O(x**2).
Essentially, this differential correction is equivalent to one
-refinement step in the Newton divide-and-average square root
+refinement step in Newton's divide-and-average square root
algorithm, effectively doubling the number of accurate bits.
This technique is used in Dekker's SQRT2 algorithm and again in
Borges' ALGORITHM 4 and 5.