Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/go_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down
4 changes: 3 additions & 1 deletion interpreter/operator_arithmetic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Loading