]> Cypherpunks repositories - gostls13.git/commitdiff
math/big: add clarifying (internal) comment
authorRobert Griesemer <gri@golang.org>
Mon, 16 Sep 2024 17:41:28 +0000 (10:41 -0700)
committerGopher Robot <gobot@golang.org>
Mon, 16 Sep 2024 19:10:55 +0000 (19:10 +0000)
Follow-up on CL 467555.

Change-Id: I1815b5def656ae4b86c31385ad0737f0465fa2d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/613535
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Bypass: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Tim King <taking@google.com>
src/math/big/natdiv.go

index 084ac726587fe3edd413dc218ff4f69d98db3244..2e66e3425c61cf2701fa32ad6d96766e64a40087 100644 (file)
@@ -643,6 +643,7 @@ func (q nat) divBasic(u, v nat) {
        rec := reciprocalWord(vn1)
 
        // Invent a leading 0 for u, for the first iteration.
+       // Invariant: ujn == u[j+n] in each iteration.
        ujn := Word(0)
 
        // Compute each digit of quotient.