| 300 | } |
| 301 | |
| 302 | absl::StatusOr<int64_t> CheckedDoubleToInt64(double v) { |
| 303 | CEL_RETURN_IF_ERROR( |
| 304 | CheckRange(std::isfinite(v) && v < kDoubleToIntMax && v > kDoubleToIntMin, |
| 305 | "double out of int64 range")); |
| 306 | return static_cast<int64_t>(v); |
| 307 | } |
| 308 | |
| 309 | absl::StatusOr<uint64_t> CheckedDoubleToUint64(double v) { |
| 310 | CEL_RETURN_IF_ERROR( |
no test coverage detected