You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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-java is the outlier among the three official reference clients; math.round should instead use HALF_UP
To Reproduce
Check which components this affects:
parser
checker
runtime
Sample expression and input that reproduces the issue:
// sample expression string
math.round(42.5) == 42.0 // should be 43.0
Describe the bug
math.roundusesHALF_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.roundshould instead useHALF_UPTo Reproduce
Check which components this affects:
Sample expression and input that reproduces the issue:
Fix is at #1054