[go] math/big: fix edge case float formatting

5 views
Skip to first unread message

Neal Patel (Gerrit)

unread,
May 18, 2026, 2:41:35 PMMay 18
to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
Attention needed from Robert Griesemer

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Robert Griesemer
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
Gerrit-Change-Number: 779080
Gerrit-PatchSet: 5
Gerrit-Owner: Neal Patel <ne...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-CC: Neal Patel <neal...@google.com>
Gerrit-Attention: Robert Griesemer <g...@google.com>
Gerrit-Comment-Date: Mon, 18 May 2026 18:41:31 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Neal Patel (Gerrit)

unread,
May 18, 2026, 2:43:37 PMMay 18
to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
Attention needed from Robert Griesemer

Neal Patel uploaded new patchset

Neal Patel uploaded patch set #6 to this change.
Open in Gerrit

Related details

Attention is currently required from:
  • Robert Griesemer
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newpatchset
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
Gerrit-Change-Number: 779080
Gerrit-PatchSet: 6
unsatisfied_requirement
satisfied_requirement
open
diffy

Neal Patel (Gerrit)

unread,
May 19, 2026, 1:52:36 PMMay 19
to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
Attention needed from Robert Griesemer

Message from Neal Patel

Set Ready For Review

Open in Gerrit

Related details

Attention is currently required from:
  • Robert Griesemer
Submit Requirements:
  • requirement is not satisfiedCode-Review
  • requirement satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
  • requirement is not satisfiedTryBots-Pass
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: go
Gerrit-Branch: master
Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
Gerrit-Change-Number: 779080
Gerrit-PatchSet: 7
Gerrit-Owner: Neal Patel <ne...@golang.org>
Gerrit-Reviewer: Robert Griesemer <g...@google.com>
Gerrit-CC: Neal Patel <neal...@google.com>
Gerrit-Attention: Robert Griesemer <g...@google.com>
Gerrit-Comment-Date: Tue, 19 May 2026 17:52:33 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
satisfied_requirement
open
diffy

Robert Griesemer (Gerrit)

unread,
Jun 15, 2026, 8:18:01 PMJun 15
to Neal Patel, goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, golang-co...@googlegroups.com
Attention needed from Neal Patel

Robert Griesemer added 1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Robert Griesemer . unresolved

Thanks for this - but it doesn't seem to address the issue at hand. Given:

```go
func TestIssue71245(t *testing.T) {
f := math.SmallestNonzeroFloat64
s := strconv.FormatFloat(f, 'e', 25, 64)
fmt.Printf(" f = %s\n", s)
	bf := NewFloat(f)
bs := bf.Text('e', 25)
fmt.Printf("bf = %s\n", bs)
	fmt.Println()
	s = strconv.FormatFloat(f, 'g', -1, 64)
fmt.Printf(" f = %s\n", s)
	bs = bf.Text('g', -1)
fmt.Printf("bf = %s\n", bs)
}
```

I get

```
$ go test -run Issue71245
f = 4.9406564584124654417656879e-324
bf = 4.9406564584124654417656879e-324
 f = 5e-324
bf = 4.940656458412465e-324
```

yet I would have expected that the 2nd pair should also match (per the issue).
What am I missing?

Open in Gerrit

Related details

Attention is currently required from:
  • Neal Patel
Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
    Gerrit-Change-Number: 779080
    Gerrit-PatchSet: 7
    Gerrit-Owner: Neal Patel <ne...@golang.org>
    Gerrit-Reviewer: Robert Griesemer <g...@google.com>
    Gerrit-CC: Keith Randall <k...@golang.org>
    Gerrit-CC: Neal Patel <neal...@google.com>
    Gerrit-Attention: Neal Patel <ne...@golang.org>
    Gerrit-Comment-Date: Tue, 16 Jun 2026 00:17:56 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Robert Griesemer (Gerrit)

    unread,
    Jun 16, 2026, 12:46:34 AMJun 16
    to Neal Patel, goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, golang-co...@googlegroups.com
    Attention needed from Neal Patel

    Robert Griesemer added 1 comment

    Patchset-level comments
    Robert Griesemer . resolved

    An aside, `strconv.FormatFloat` formats correctly ([playground](https://go.dev/play/p/YOTQR9Rvaic?v=gotip)).

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Neal Patel
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
    Gerrit-Change-Number: 779080
    Gerrit-PatchSet: 7
    Gerrit-Owner: Neal Patel <ne...@golang.org>
    Gerrit-Reviewer: Robert Griesemer <g...@google.com>
    Gerrit-CC: Keith Randall <k...@golang.org>
    Gerrit-CC: Neal Patel <neal...@google.com>
    Gerrit-Attention: Neal Patel <ne...@golang.org>
    Gerrit-Comment-Date: Tue, 16 Jun 2026 04:46:28 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Neal Patel (Gerrit)

    unread,
    Jun 29, 2026, 3:45:53 PM (2 days ago) Jun 29
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Neal Patel

    Neal Patel uploaded new patchset

    Neal Patel uploaded patch set #8 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Neal Patel
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
    Gerrit-Change-Number: 779080
    Gerrit-PatchSet: 8
    unsatisfied_requirement
    open
    diffy

    Neal Patel (Gerrit)

    unread,
    Jun 29, 2026, 4:14:05 PM (2 days ago) Jun 29
    to goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
    Attention needed from Robert Griesemer

    Neal Patel added 2 comments

    Patchset-level comments
    Robert Griesemer . unresolved

    Thanks for this - but it doesn't seem to address the issue at hand. Given:

    ```go
    func TestIssue71245(t *testing.T) {
    f := math.SmallestNonzeroFloat64
    s := strconv.FormatFloat(f, 'e', 25, 64)
    fmt.Printf(" f = %s\n", s)
    	bf := NewFloat(f)
    bs := bf.Text('e', 25)
    fmt.Printf("bf = %s\n", bs)
    	fmt.Println()
    	s = strconv.FormatFloat(f, 'g', -1, 64)
    fmt.Printf(" f = %s\n", s)
    	bs = bf.Text('g', -1)
    fmt.Printf("bf = %s\n", bs)
    }
    ```

    I get

    ```
    $ go test -run Issue71245
    f = 4.9406564584124654417656879e-324
    bf = 4.9406564584124654417656879e-324
     f = 5e-324
    bf = 4.940656458412465e-324
    ```

    yet I would have expected that the 2nd pair should also match (per the issue).
    What am I missing?

    Neal Patel

    You're not missing anything.
    This CL was mis-scoped; apologies.

    I conflated the normal/denormal test cases
    in this change set as relating to #71245
    when they do not.

    This CL is not addressing #71245.

    Your CL 792040 added:

    ```
    // Note that Text may return a different result than strconv.FormatFloat for
    // corresponding arguments if the matching float32 or float64 number provided
    // to strconv.FormatFloat is a denormalized number.
    ```

    Given your investigation and doc string,
    it seems to imply this behavior in the normals
    is not WAI? https://go.dev/play/p/l3aqWjhQa0g

    This is what this CL aims to address.

    If this is the case, I should rewrite to something that looks like:

    ```
    l := lower.at(i)
    u := upper.at(i)
      okdown := l != m || inclusive && i+1 == len(lower.mant)
      okup := m != u && (inclusive || m+1 < u || i+1 < len(upper.mant) || I >= len(upper.mant) && m < '9')
    ```

    Am I missing something?

    File src/math/big/floatconv_test.go
    Line 387, Patchset 8 (Latest):func TestIssue71245(t *testing.T) {
    Neal Patel . unresolved

    todo: rework; needs normals only... call them out explicitly. delink issue.

    ```
    func TestRoundShortestNormal(t *testing.T) {
    for _, x := range []float64{
    4.3749999999999917e+17,
    4.9999999999999917e+17,
    4.7619047619047597e+17,
    3.7499999999999917e+17,
    1.9047619047619039e+18,
    } {
    want := strconv.FormatFloat(x, 'g', -1, 64)
    got := new(Float).SetPrec(53).SetFloat64(x).Text('g', -1)
    if got != want {
    t.Errorf("Text('g', -1) = %s, want %s", got, want)
    }
    }
    }
    ```
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Robert Griesemer
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
    Gerrit-Change-Number: 779080
    Gerrit-PatchSet: 8
    Gerrit-Owner: Neal Patel <ne...@golang.org>
    Gerrit-Reviewer: Robert Griesemer <g...@google.com>
    Gerrit-CC: Keith Randall <k...@golang.org>
    Gerrit-CC: Neal Patel <neal...@google.com>
    Gerrit-Attention: Robert Griesemer <g...@google.com>
    Gerrit-Comment-Date: Mon, 29 Jun 2026 20:14:02 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Robert Griesemer <g...@google.com>
    unsatisfied_requirement
    open
    diffy

    Robert Griesemer (Gerrit)

    unread,
    Jun 29, 2026, 7:15:53 PM (2 days ago) Jun 29
    to Neal Patel, goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, golang-co...@googlegroups.com
    Attention needed from Neal Patel

    Robert Griesemer added 2 comments

    Patchset-level comments
    Robert Griesemer

    No, you're correct that there is indeed an issue here, per your playground example.
    I filed #80206 to track this.

    I have verified that `|| i >= len(upper.mant) && m < '9'` fixes this, but I need to spend some more time to understand this code again.

    I suggest keeping it to this minimal fix plus adjusted comments, explaining the extra clause, in the style that's already present. (Don't add all the constants - it's not making is simpler.)

    File src/math/big/ftoa.go
    Line 180, Patchset 8 (Latest): // TODO(gri) strconv/ftoa.do describes a shortcut in some cases.
    Robert Griesemer . unresolved

    I believe this comment is not up-to-date - I haven't found the respective shortcut. I believe the respective code has changed a lot.
    Also, in any case, it should be internal/strconv/ftoa.go now.
    Maybe remove unless you can find the reference?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Neal Patel
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
    Gerrit-Change-Number: 779080
    Gerrit-PatchSet: 8
    Gerrit-Owner: Neal Patel <ne...@golang.org>
    Gerrit-Reviewer: Robert Griesemer <g...@google.com>
    Gerrit-CC: Keith Randall <k...@golang.org>
    Gerrit-CC: Neal Patel <neal...@google.com>
    Gerrit-Attention: Neal Patel <ne...@golang.org>
    Gerrit-Comment-Date: Mon, 29 Jun 2026 23:15:46 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Robert Griesemer <g...@google.com>
    Comment-In-Reply-To: Neal Patel <ne...@golang.org>
    unsatisfied_requirement
    open
    diffy

    Neal Patel (Gerrit)

    unread,
    Jun 29, 2026, 7:32:18 PM (2 days ago) Jun 29
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Neal Patel

    Neal Patel uploaded new patchset

    Neal Patel uploaded patch set #9 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Neal Patel
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
    Gerrit-Change-Number: 779080
    Gerrit-PatchSet: 9
    unsatisfied_requirement
    open
    diffy

    Neal Patel (Gerrit)

    unread,
    Jun 30, 2026, 1:38:46 PM (11 hours ago) Jun 30
    to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
    Attention needed from Neal Patel

    Neal Patel uploaded new patchset

    Neal Patel uploaded patch set #10 to this change.
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Neal Patel
    Submit Requirements:
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    • requirement is not satisfiedTryBots-Pass
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: newpatchset
    Gerrit-Project: go
    Gerrit-Branch: master
    Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
    Gerrit-Change-Number: 779080
    Gerrit-PatchSet: 10
    unsatisfied_requirement
    open
    diffy

    Neal Patel (Gerrit)

    unread,
    Jun 30, 2026, 1:39:18 PM (11 hours ago) Jun 30
    to goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
    Attention needed from Robert Griesemer

    Neal Patel added 3 comments

    Patchset-level comments
    File-level comment, Patchset 7:
    Robert Griesemer . resolved
    File src/math/big/floatconv_test.go
    Line 387, Patchset 8:func TestIssue71245(t *testing.T) {
    Neal Patel . resolved

    todo: rework; needs normals only... call them out explicitly. delink issue.

    ```
    func TestRoundShortestNormal(t *testing.T) {
    for _, x := range []float64{
    4.3749999999999917e+17,
    4.9999999999999917e+17,
    4.7619047619047597e+17,
    3.7499999999999917e+17,
    1.9047619047619039e+18,
    } {
    want := strconv.FormatFloat(x, 'g', -1, 64)
    got := new(Float).SetPrec(53).SetFloat64(x).Text('g', -1)
    if got != want {
    t.Errorf("Text('g', -1) = %s, want %s", got, want)
    }
    }
    }
    ```
    Neal Patel

    Done

    File src/math/big/ftoa.go
    Line 180, Patchset 8: // TODO(gri) strconv/ftoa.do describes a shortcut in some cases.
    Robert Griesemer . resolved

    I believe this comment is not up-to-date - I haven't found the respective shortcut. I believe the respective code has changed a lot.
    Also, in any case, it should be internal/strconv/ftoa.go now.
    Maybe remove unless you can find the reference?

    Neal Patel

    Looks like you're right: b2a346bbd1 moves it to internal/strconv/ftoa.go

    also updated header of this file

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Robert Griesemer
    Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
      Gerrit-Change-Number: 779080
      Gerrit-PatchSet: 9
      Gerrit-Owner: Neal Patel <ne...@golang.org>
      Gerrit-Reviewer: Robert Griesemer <g...@google.com>
      Gerrit-CC: Keith Randall <k...@golang.org>
      Gerrit-CC: Neal Patel <neal...@google.com>
      Gerrit-Attention: Robert Griesemer <g...@google.com>
      Gerrit-Comment-Date: Tue, 30 Jun 2026 17:39:14 +0000
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Neal Patel (Gerrit)

      unread,
      Jun 30, 2026, 1:47:04 PM (10 hours ago) Jun 30
      to goph...@pubsubhelper.golang.org, Keith Randall, golang...@luci-project-accounts.iam.gserviceaccount.com, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
      Attention needed from Robert Griesemer

      Neal Patel voted Commit-Queue+1

      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Robert Griesemer
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
      Gerrit-Change-Number: 779080
      Gerrit-PatchSet: 10
      Gerrit-Owner: Neal Patel <ne...@golang.org>
      Gerrit-Reviewer: Neal Patel <ne...@golang.org>
      Gerrit-Reviewer: Robert Griesemer <g...@google.com>
      Gerrit-CC: Keith Randall <k...@golang.org>
      Gerrit-CC: Neal Patel <neal...@google.com>
      Gerrit-Attention: Robert Griesemer <g...@google.com>
      Gerrit-Comment-Date: Tue, 30 Jun 2026 17:47:00 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Neal Patel (Gerrit)

      unread,
      Jun 30, 2026, 1:50:27 PM (10 hours ago) Jun 30
      to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
      Attention needed from Neal Patel and Robert Griesemer

      Neal Patel uploaded new patchset

      Neal Patel uploaded patch set #11 to this change.
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Neal Patel
      • Robert Griesemer
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: newpatchset
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
      Gerrit-Change-Number: 779080
      Gerrit-PatchSet: 11
      Gerrit-Owner: Neal Patel <ne...@golang.org>
      Gerrit-Reviewer: Neal Patel <ne...@golang.org>
      Gerrit-Reviewer: Robert Griesemer <g...@google.com>
      Gerrit-CC: Keith Randall <k...@golang.org>
      Gerrit-CC: Neal Patel <neal...@google.com>
      Gerrit-Attention: Robert Griesemer <g...@google.com>
      Gerrit-Attention: Neal Patel <ne...@golang.org>
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Neal Patel (Gerrit)

      unread,
      Jun 30, 2026, 1:59:34 PM (10 hours ago) Jun 30
      to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
      Attention needed from Robert Griesemer

      Neal Patel voted Commit-Queue+1

      Commit-Queue+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Robert Griesemer
      Submit Requirements:
      • requirement is not satisfiedCode-Review
      • requirement satisfiedNo-Unresolved-Comments
      • requirement is not satisfiedReview-Enforcement
      • requirement is not satisfiedTryBots-Pass
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: go
      Gerrit-Branch: master
      Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
      Gerrit-Change-Number: 779080
      Gerrit-PatchSet: 11
      Gerrit-Owner: Neal Patel <ne...@golang.org>
      Gerrit-Reviewer: Neal Patel <ne...@golang.org>
      Gerrit-Reviewer: Robert Griesemer <g...@google.com>
      Gerrit-CC: Keith Randall <k...@golang.org>
      Gerrit-CC: Neal Patel <neal...@google.com>
      Gerrit-Attention: Robert Griesemer <g...@google.com>
      Gerrit-Comment-Date: Tue, 30 Jun 2026 17:59:29 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      unsatisfied_requirement
      satisfied_requirement
      open
      diffy

      Robert Griesemer (Gerrit)

      unread,
      Jun 30, 2026, 2:03:34 PM (10 hours ago) Jun 30
      to Neal Patel, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Neal Patel, golang-co...@googlegroups.com

      Robert Griesemer added 4 comments

      Patchset-level comments
      File-level comment, Patchset 11 (Latest):
      Robert Griesemer . resolved

      Minor suggestions.
      Still working on understanding the change.

      File src/math/big/floatconv_test.go
      Line 388, Patchset 11 (Latest): text := func(x float64) string {
      Robert Griesemer . unresolved

      add a comment somewhere, perhaps on line 388:

      // see go.dev/issue/80206

      (this will help another reader understand why this test is here)

      File src/math/big/ftoa.go
      Line 229, Patchset 11 (Latest): // m == '9' (which would carry onto the exclusive upper bound).
      Robert Griesemer . unresolved

      add comment:

      // See also go.dev/issue/80206.

      Line 231, Patchset 11 (Latest): i >= len(upper.mant) && m < '9')
      Robert Griesemer . unresolved

      no need for the line break - we have big screens

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
        Gerrit-Change-Number: 779080
        Gerrit-PatchSet: 11
        Gerrit-Owner: Neal Patel <ne...@golang.org>
        Gerrit-Reviewer: Neal Patel <ne...@golang.org>
        Gerrit-Reviewer: Robert Griesemer <g...@google.com>
        Gerrit-CC: Keith Randall <k...@golang.org>
        Gerrit-CC: Neal Patel <neal...@google.com>
        Gerrit-Comment-Date: Tue, 30 Jun 2026 18:03:27 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Neal Patel (Gerrit)

        unread,
        Jun 30, 2026, 4:59:27 PM (7 hours ago) Jun 30
        to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
        Attention needed from Neal Patel

        Neal Patel uploaded new patchset

        Neal Patel uploaded patch set #12 to this change.
        Following approvals got outdated and were removed:
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Neal Patel
        Submit Requirements:
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        • requirement is not satisfiedTryBots-Pass
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: newpatchset
        Gerrit-Project: go
        Gerrit-Branch: master
        Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
        Gerrit-Change-Number: 779080
        Gerrit-PatchSet: 12
        Gerrit-Owner: Neal Patel <ne...@golang.org>
        Gerrit-Reviewer: Neal Patel <ne...@golang.org>
        Gerrit-Reviewer: Robert Griesemer <g...@google.com>
        Gerrit-CC: Keith Randall <k...@golang.org>
        Gerrit-CC: Neal Patel <neal...@google.com>
        Gerrit-Attention: Neal Patel <ne...@golang.org>
        unsatisfied_requirement
        open
        diffy

        Neal Patel (Gerrit)

        unread,
        Jun 30, 2026, 4:59:35 PM (7 hours ago) Jun 30
        to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
        Attention needed from Robert Griesemer

        Neal Patel added 3 comments

        File src/math/big/floatconv_test.go
        Line 388, Patchset 11: text := func(x float64) string {
        Robert Griesemer . resolved

        add a comment somewhere, perhaps on line 388:

        // see go.dev/issue/80206

        (this will help another reader understand why this test is here)

        Neal Patel

        Done

        File src/math/big/ftoa.go
        Line 229, Patchset 11: // m == '9' (which would carry onto the exclusive upper bound).
        Robert Griesemer . resolved

        add comment:

        // See also go.dev/issue/80206.

        Neal Patel

        Done

        Line 231, Patchset 11: i >= len(upper.mant) && m < '9')
        Robert Griesemer . resolved

        no need for the line break - we have big screens

        Neal Patel

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Robert Griesemer
        Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
          Gerrit-Change-Number: 779080
          Gerrit-PatchSet: 12
          Gerrit-Owner: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Robert Griesemer <g...@google.com>
          Gerrit-CC: Keith Randall <k...@golang.org>
          Gerrit-CC: Neal Patel <neal...@google.com>
          Gerrit-Attention: Robert Griesemer <g...@google.com>
          Gerrit-Comment-Date: Tue, 30 Jun 2026 20:59:31 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Robert Griesemer <g...@google.com>
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Neal Patel (Gerrit)

          unread,
          Jun 30, 2026, 4:59:40 PM (7 hours ago) Jun 30
          to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
          Attention needed from Robert Griesemer

          Neal Patel voted Commit-Queue+1

          Commit-Queue+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Robert Griesemer
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
          Gerrit-Change-Number: 779080
          Gerrit-PatchSet: 12
          Gerrit-Owner: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Robert Griesemer <g...@google.com>
          Gerrit-CC: Keith Randall <k...@golang.org>
          Gerrit-CC: Neal Patel <neal...@google.com>
          Gerrit-Attention: Robert Griesemer <g...@google.com>
          Gerrit-Comment-Date: Tue, 30 Jun 2026 20:59:37 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Neal Patel (Gerrit)

          unread,
          Jun 30, 2026, 5:01:15 PM (7 hours ago) Jun 30
          to goph...@pubsubhelper.golang.org, golang-co...@googlegroups.com
          Attention needed from Robert Griesemer

          Neal Patel uploaded new patchset

          Neal Patel uploaded patch set #13 to this change.
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Robert Griesemer
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: newpatchset
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
          Gerrit-Change-Number: 779080
          Gerrit-PatchSet: 13
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Neal Patel (Gerrit)

          unread,
          Jun 30, 2026, 7:44:21 PM (4 hours ago) Jun 30
          to goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Neal Patel, Robert Griesemer, golang-co...@googlegroups.com
          Attention needed from Robert Griesemer

          Neal Patel voted Commit-Queue+1

          Commit-Queue+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Robert Griesemer
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
          Gerrit-Change-Number: 779080
          Gerrit-PatchSet: 13
          Gerrit-Owner: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Robert Griesemer <g...@google.com>
          Gerrit-CC: Keith Randall <k...@golang.org>
          Gerrit-CC: Neal Patel <neal...@google.com>
          Gerrit-Attention: Robert Griesemer <g...@google.com>
          Gerrit-Comment-Date: Tue, 30 Jun 2026 23:44:15 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Neal Patel (Gerrit)

          unread,
          Jun 30, 2026, 7:45:27 PM (4 hours ago) Jun 30
          to Neal Patel, goph...@pubsubhelper.golang.org, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, Robert Griesemer, golang-co...@googlegroups.com
          Attention needed from Neal Patel and Robert Griesemer

          Neal Patel voted Code-Review+1

          Code-Review+1
          Open in Gerrit

          Related details

          Attention is currently required from:
          • Neal Patel
          • Robert Griesemer
          Submit Requirements:
          • requirement is not satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement is not satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
          Gerrit-Change-Number: 779080
          Gerrit-PatchSet: 14
          Gerrit-Owner: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Neal Patel <neal...@google.com>
          Gerrit-Attention: Robert Griesemer <g...@google.com>
          Gerrit-Attention: Neal Patel <ne...@golang.org>
          Gerrit-Comment-Date: Tue, 30 Jun 2026 23:45:20 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          unsatisfied_requirement
          satisfied_requirement
          open
          diffy

          Robert Griesemer (Gerrit)

          unread,
          Jun 30, 2026, 7:52:33 PM (4 hours ago) Jun 30
          to Neal Patel, goph...@pubsubhelper.golang.org, Neal Patel, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, golang-co...@googlegroups.com

          Robert Griesemer voted and added 1 comment

          Votes added by Robert Griesemer

          Code-Review+2

          1 comment

          Patchset-level comments
          File-level comment, Patchset 13:
          Robert Griesemer . resolved

          Thanks. I think it looks right.

          I've been trying to see if line 231 in roundShortest can be simplified somehow, but computing a different u upfront (rather than 0 when we are at the end), but I don't think the code would be simpler.

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
          Gerrit-Change-Number: 779080
          Gerrit-PatchSet: 13
          Gerrit-Owner: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Neal Patel <ne...@golang.org>
          Gerrit-CC: Neal Patel <neal...@google.com>
          Gerrit-Comment-Date: Tue, 30 Jun 2026 23:52:27 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Neal Patel (Gerrit)

          unread,
          Jun 30, 2026, 8:19:29 PM (4 hours ago) Jun 30
          to goph...@pubsubhelper.golang.org, Robert Griesemer, Neal Patel, golang...@luci-project-accounts.iam.gserviceaccount.com, Keith Randall, golang-co...@googlegroups.com

          Neal Patel added 1 comment

          Patchset-level comments
          Robert Griesemer . resolved

          Thanks. I think it looks right.

          I've been trying to see if line 231 in roundShortest can be simplified somehow, but computing a different u upfront (rather than 0 when we are at the end), but I don't think the code would be simpler.

          Neal Patel

          I do not believe you can simplify L231; CL 779340 sidesteps this entirely, though not _simple._

          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Review
          • requirement satisfiedNo-Unresolved-Comments
          • requirement satisfiedReview-Enforcement
          • requirement is not satisfiedTryBots-Pass
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: comment
          Gerrit-Project: go
          Gerrit-Branch: master
          Gerrit-Change-Id: I9d346a7a67a7a6c3cfaea50ae6fb67331e853bcb
          Gerrit-Change-Number: 779080
          Gerrit-PatchSet: 14
          Gerrit-Owner: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Neal Patel <ne...@golang.org>
          Gerrit-Reviewer: Robert Griesemer <g...@google.com>
          Gerrit-CC: Keith Randall <k...@golang.org>
          Gerrit-CC: Neal Patel <neal...@google.com>
          Gerrit-Comment-Date: Wed, 01 Jul 2026 00:19:24 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy
          Reply all
          Reply to author
          Forward
          0 new messages