Title: [BUG] math.round incorrectly uses HALF_EVEN instead of HALF_UP · Issue #1055 · cel-expr/cel-java · GitHub
Open Graph Title: [BUG] math.round incorrectly uses HALF_EVEN instead of HALF_UP · Issue #1055 · cel-expr/cel-java
X Title: [BUG] math.round incorrectly uses HALF_EVEN instead of HALF_UP · Issue #1055 · cel-expr/cel-java
Description: Describe the bug math.round uses HALF_EVEN (banker's rounding) internally, but cel-java's own function declaration, cel-go's reference implementation, and cel-cpp's reference implementation all specify "ties round away from zero". cel-ja...
Open Graph Description: Describe the bug math.round uses HALF_EVEN (banker's rounding) internally, but cel-java's own function declaration, cel-go's reference implementation, and cel-cpp's reference implementation all spe...
X Description: Describe the bug math.round uses HALF_EVEN (banker's rounding) internally, but cel-java's own function declaration, cel-go's reference implementation, and cel-cpp's reference implem...
Opengraph URL: https://github.com/cel-expr/cel-java/issues/1055
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[BUG] math.round incorrectly uses HALF_EVEN instead of HALF_UP","articleBody":"\n\n**Describe the bug**\n`math.round` uses `HALF_EVEN` (banker's rounding) internally, but cel-java's own function declaration, cel-go's reference implementation, and cel-cpp's reference implementation all specify \"ties round away from zero\". cel-java is the outlier among the three official reference clients; `math.round` should instead use `HALF_UP`\n\n**To Reproduce**\nCheck which components this affects:\n\n- [ ] parser\n- [ ] checker\n- [x] runtime\n\nSample expression and input that reproduces the issue:\n```cel\n// sample expression string\nmath.round(42.5) == 42.0 // should be 43.0\n```\n\nFix is at https://github.com/google/cel-java/pull/1054","author":{"url":"https://github.com/rayokota","@type":"Person","name":"rayokota"},"datePublished":"2026-05-14T19:30:02.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1055/cel-java/issues/1055"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5c5d011e-59d3-9e94-22fd-e04879ee44a0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 914A:3B3BAC:330548:4AFC8A:6A4E04D9 |
| html-safe-nonce | 28eada287589e083a657024dbc77c2873ef4d29f621d380af41ea66bdb0b2148 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTRBOjNCM0JBQzozMzA1NDg6NEFGQzhBOjZBNEUwNEQ5IiwidmlzaXRvcl9pZCI6Ijg4NTAxNzkwNDc4MDU0MzE5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 97251a24ec16bb17ec7e38ebcbe385d13d6924ce922555472d6c4b10cc6650a9 |
| hovercard-subject-tag | issue:4448693398 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cel-expr/cel-java/1055/issue_layout |
| twitter:image | https://opengraph.githubassets.com/207c646b5b1b5fab1d0ad7df3947d71589970244a6da20b2c928f2b8fd27fd45/cel-expr/cel-java/issues/1055 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/207c646b5b1b5fab1d0ad7df3947d71589970244a6da20b2c928f2b8fd27fd45/cel-expr/cel-java/issues/1055 |
| og:image:alt | Describe the bug math.round uses HALF_EVEN (banker's rounding) internally, but cel-java's own function declaration, cel-go's reference implementation, and cel-cpp's reference implementation all spe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | rayokota |
| hostname | github.com |
| expected-hostname | github.com |
| None | df0492960db29b4938cb72070351d6b1d0c6c0767b27ceb8394bbf4fcc0223c6 |
| turbo-cache-control | no-preview |
| go-import | github.com/cel-expr/cel-java git https://github.com/cel-expr/cel-java.git |
| octolytics-dimension-user_id | 186625994 |
| octolytics-dimension-user_login | cel-expr |
| octolytics-dimension-repository_id | 587078119 |
| octolytics-dimension-repository_nwo | cel-expr/cel-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 587078119 |
| octolytics-dimension-repository_network_root_nwo | cel-expr/cel-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 52bde38e24398476f8eb1e0760c81346c6a00812 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width