MCPcopy Index your code
hub / github.com/endbasic/endbasic / checked_pow_integer

Function checked_pow_integer

core/src/vm/context.rs:127–129  ·  view source on GitHub ↗
(lhs: i32, exp: u32)

Source from the content-addressed store, hash-verified

125/// Custom implementation of checked integer powers for error reporting purposes.
126#[inline(always)]
127fn checked_pow_integer(lhs: i32, exp: u32) -> Result<i32, &'static str> {
128 lhs.checked_pow(exp).ok_or("Integer overflow")
129}
130
131/// Custom implementation of checked left shift for error reporting purposes.
132#[inline(always)]

Callers 1

do_power_integerMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected