From 8e7225ab187046465ff315e68fb43a7315ba561e Mon Sep 17 00:00:00 2001 From: Evan Gordon Date: Thu, 16 Jul 2026 17:38:46 -0700 Subject: [PATCH] Update GitHub Actions (checkout and setup-go) to v6 to use Node 24 and bump go version to 1.26. PiperOrigin-RevId: 949269810 --- .github/workflows/go_build.yaml | 16 ++++++++-------- interpreter/operator_arithmetic.go | 4 +++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/go_build.yaml b/.github/workflows/go_build.yaml index 4a6218b..2cc4db5 100644 --- a/.github/workflows/go_build.yaml +++ b/.github/workflows/go_build.yaml @@ -23,14 +23,14 @@ jobs: os: [ubuntu-latest, macOS-latest, windows-latest] steps: - - name: Set up Go 1.22 - uses: actions/setup-go@v5 + - name: Set up Go + uses: actions/setup-go@v6 with: - go-version: 1.22 + go-version: 1.26 id: go - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Get dependencies run: | @@ -50,14 +50,14 @@ jobs: os: [ubuntu-latest] steps: - - name: Set up Go 1.22 - uses: actions/setup-go@v5 + - name: Set up Go + uses: actions/setup-go@v6 with: - go-version: 1.22 + go-version: 1.26 id: go - name: Check out code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Get dependencies run: | diff --git a/interpreter/operator_arithmetic.go b/interpreter/operator_arithmetic.go index 7f840cb..7a4816b 100644 --- a/interpreter/operator_arithmetic.go +++ b/interpreter/operator_arithmetic.go @@ -704,7 +704,9 @@ func evalRound(_ model.INaryExpression, operands []result.Value) (result.Value, // the future). For now if the value is negative we round towards zero. ratioedDecimal := d * ratio _, frac := math.Modf(ratioedDecimal) - if frac == -0.5 { + // Use a small epsilon (1e-12) to detect halfway values, handling float precision errors from + // multiplication. + if math.Abs(frac+0.5) < 1e-12 { // force go to round towards zero ratioedDecimal += 0.1 }