OxL Reference

method i128.pow

Power by repeated squaring; panics on overflow like *.

Example:

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

Complexity. O(log e).

Since. 1.0.0-beta

Parameters

NameType
eu32

Returns

i128

Effects

none declared (pure unless the body says otherwise)

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

See also