method u32.pow
Power by repeated squaring; panics on overflow like *.
Example:
fn main() io {
let two: u32 = 2
print("{two.pow(5)} {two.pow(0)}")
}Output
32 1
pub(api) fn pow(e: u32) -> u32Complexity. O(log e).
Since. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
e | u32 |
Returns
u32
Effects
none declared (pure unless the body says otherwise)
Defined in: std/core/numbers.oxl:2655