MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / CheckedDoubleToInt64

Function CheckedDoubleToInt64

internal/overflow.cc:302–307  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302absl::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
309absl::StatusOr<uint64_t> CheckedDoubleToUint64(double v) {
310 CEL_RETURN_IF_ERROR(

Callers 2

overflow_test.ccFile · 0.85

Calls 1

CheckRangeFunction · 0.85

Tested by

no test coverage detected