google / cel-spec

Common Expression Language -- specification and binary representation
https://cel.dev
Apache License 2.0
2.78k stars 222 forks source link

Standardize double-to-integer conversion via truncation #191

Closed JimLarson closed 3 years ago

JimLarson commented 3 years ago

Tests were added for double-to-integer conversion specifying round-half-away semantics (following GoogleSQL), but the implementations used the more common truncation (round towards zero), as is done natively in C, Go, and Java.

We'll standardize on round-towards-zero to match the implementations and the more common expectation of programmers.