mirror of
https://github.com/golang/go
synced 2024-11-22 02:54:39 -07:00
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
This commit is contained in:
parent
90c6558b6a
commit
40a2fc80cf
@ -392,7 +392,7 @@ Proof that q ≤ q̂:
|
||||
≥ (1/y)·((x₁ - y₁ + 1)·S - x) [above: q̂·y₁ ≥ x₁ - y₁ + 1]
|
||||
= (1/y)·(x₁·S - y₁·S + S - x) [distribute S]
|
||||
= (1/y)·(S - x₀ - y₁·S) [-x = -x₁·S - x₀]
|
||||
> -y₁·S / y [x₀ < S, so S - x₀ < 0; drop it]
|
||||
> -y₁·S / y [x₀ < S, so S - x₀ > 0; drop it]
|
||||
≥ -1 [y₁·S ≤ y]
|
||||
|
||||
So q̂ - q > -1.
|
||||
|
Loading…
Reference in New Issue
Block a user