1
0
mirror of https://github.com/golang/go synced 2024-09-28 20:14:28 -06:00

math/big: update comment in the implementation of FloatPrec

Follow-up on CL 539299: missed to incorporate the updated
comment per feedback on that CL.

For #50489.

Change-Id: Ib035400038b1d11532f62055b5cdb382ab75654c
Reviewed-on: https://go-review.googlesource.com/c/go/+/542115
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
Robert Griesemer 2023-11-13 16:46:47 -08:00 committed by Gopher Robot
parent c32362125b
commit e14b96cb51

View File

@ -403,8 +403,8 @@ func (x *Rat) FloatPrec() (n int, exact bool) {
// n = max(p2, p5)
// exact = q == 1
//
// See https://en.wikipedia.org/wiki/Repeating_decimal for
// details.
// For details see:
// https://en.wikipedia.org/wiki/Repeating_decimal#Reciprocals_of_integers_not_coprime_to_10
d := x.Denom().abs // d >= 1
// Determine p2 by counting factors of 2.