Overflowing::overflowing_pow
fn overflowing_pow(S a, int exp) -> (S, bool) Import
Source: use arith::{Overflowing}; src/arith.hy The wrapped a ** exp, and whether it wrapped. Panics with negative exponent when exp < 0, like **.
Parameters#
| Name | Type |
|---|---|
a | S |
exp | int |
Returns#
(S, bool)
See also#
Overflowing: Integer arithmetic that returns the wrapped result together with whether it wrapped.Overflowing::overflowing_add: The wrappeda + b, and whether it wrapped.Overflowing::overflowing_sub: The wrappeda - b, and whether it wrapped.Overflowing::overflowing_mul: The wrappeda * b, and whether it wrapped.Overflowing::overflowing_neg: The wrapped-a, and whether it wrapped.Overflowing::overflowing_shl:a << (n & 63), and whethernwas outside0..=63.Overflowing::overflowing_shr:a >> (n & 63), and whethernwas outside0..=63.