Skip to content

Commit

Permalink
math/big: update comment in the implementation of FloatPrec
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
griesemer authored and gopherbot committed Nov 14, 2023
1 parent c323621 commit e14b96c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/math/big/ratconv.go
Expand Up @@ -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.
Expand Down

0 comments on commit e14b96c

Please sign in to comment.