]> Cypherpunks repositories - gostls13.git/commitdiff
math/big: more cross-references in docstrings
authorKir Kolyshkin <kolyshkin@gmail.com>
Thu, 11 Jul 2024 02:22:24 +0000 (19:22 -0700)
committerGopher Robot <gobot@golang.org>
Tue, 16 Jul 2024 18:17:32 +0000 (18:17 +0000)
Change-Id: I3541859bbf3ac4f9317b82a66d21be3d5c4c5a84
Reviewed-on: https://go-review.googlesource.com/c/go/+/597658
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>

src/math/big/float.go
src/math/big/int.go

index 51d557478138d3bc85b5968676997370a55ed8a3..57ad236130a33b674d49ac7e42b3249c907790e4 100644 (file)
@@ -393,7 +393,7 @@ func (x *Float) validate0() string {
 // have before calling round. z's mantissa must be normalized (with the msb set)
 // or empty.
 //
-// CAUTION: The rounding modes ToNegativeInf, ToPositiveInf are affected by the
+// CAUTION: The rounding modes [ToNegativeInf], [ToPositiveInf] are affected by the
 // sign of z. For correct rounding, the sign of z must be set correctly before
 // calling round.
 func (z *Float) round(sbit uint) {
@@ -733,7 +733,7 @@ func msb64(x nat) uint64 {
 }
 
 // Uint64 returns the unsigned integer resulting from truncating x
-// towards zero. If 0 <= x <= math.MaxUint64, the result is [Exact]
+// towards zero. If 0 <= x <= [math.MaxUint64], the result is [Exact]
 // if x is an integer and [Below] otherwise.
 // The result is (0, [Above]) for x < 0, and ([math.MaxUint64], [Below])
 // for x > [math.MaxUint64].
index 8e9b306f075e82b14237608586d3e75c9d54ffe2..ebd5ac7b5cfa5d8653c730cc1fbf78814574863f 100644 (file)
@@ -289,7 +289,7 @@ func (z *Int) Rem(x, y *Int) *Int {
 //     r = x - y*q
 //
 // (See Daan Leijen, “Division and Modulus for Computer Scientists”.)
-// See DivMod for Euclidean division and modulus (unlike Go).
+// See [DivMod] for Euclidean division and modulus (unlike Go).
 func (z *Int) QuoRem(x, y, r *Int) (*Int, *Int) {
        z.abs, r.abs = z.abs.div(r.abs, x.abs, y.abs)
        z.neg, r.neg = len(z.abs) > 0 && x.neg != y.neg, len(r.abs) > 0 && x.neg // 0 has no sign