OxL Reference

method isize.pow

Power by repeated squaring; panics on overflow like *.

Example:

oxl✓ checked in CI
fn main() io {
  let two: isize = 2
  print("{two.pow(5)} {two.pow(0)}")
}
Output
32 1
pub(api) fn pow(e: u32) -> isize

Complexity. O(log e).

Since. 1.0.0-beta

Parameters

NameType
eu32

Returns

isize

Effects

none declared (pure unless the body says otherwise)

Defined in: std/core/numbers.oxl:1692

See also