diff options
| author | Russ Cox <rsc@golang.org> | 2025-11-01 23:26:17 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-11-03 20:09:12 -0800 |
| commit | 9795c7ba220702c8bbf0188a8fc28e1d482bae4f (patch) | |
| tree | 4f411fe59a91875bb8561749073f06b0a3f89160 /src/encoding | |
| parent | ad5e941a4559a402fa3f428e612c58ec86471517 (diff) | |
| download | go-9795c7ba220702c8bbf0188a8fc28e1d482bae4f.tar.xz | |
internal/strconv: fix pow10 off-by-one in exponent result
The exact meaning of pow10 was not defined nor tested directly.
Define it as pow10(e) returns mant, exp where mant/2^128 * 2**exp = 10^e.
This is the most natural definition but is off-by-one from what
it had been returning. Fix the off-by-one and then adjust the
call sites to stop compensating for it.
Change-Id: I9ee475854f30be4bd0d4f4d770a6b12ec68281fe
Reviewed-on: https://go-review.googlesource.com/c/go/+/717180
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
Auto-Submit: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions
