Skip to content

Commit fc51e50

Browse files
With-Skygopherbot
authored andcommitted
math/big: fix comment typo in natdiv.go
Comment in line 395: [x₀ < S, so S - x₀ < 0; drop it] Should be: [x₀ < S, so S - x₀ > 0; drop it] The proof is based on S - x₀ > 0, thus it's a typo of comment. Fixes #68466 Change-Id: I68bb7cb909ba2bfe02a8873f74b57edc6679b72a GitHub-Last-Rev: 40a2fc8 GitHub-Pull-Request: #68487 Reviewed-on: https://go-review.googlesource.com/c/go/+/598855 Reviewed-by: Cherry Mui <[email protected]> Reviewed-by: Keith Randall <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Keith Randall <[email protected]> Auto-Submit: Keith Randall <[email protected]>
1 parent 90c6558 commit fc51e50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/math/big/natdiv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ Proof that q ≤ q̂:
392392
≥ (1/y)·((x₁ - y₁ + 1)·S - x) [above: q̂·y₁ ≥ x₁ - y₁ + 1]
393393
= (1/y)·(x₁·S - y₁·S + S - x) [distribute S]
394394
= (1/y)·(S - x₀ - y₁·S) [-x = -x₁·S - x₀]
395-
> -y₁·S / y [x₀ < S, so S - x₀ < 0; drop it]
395+
> -y₁·S / y [x₀ < S, so S - x₀ > 0; drop it]
396396
≥ -1 [y₁·S ≤ y]
397397
398398
So q̂ - q > -1.

0 commit comments

Comments
 (0)