> ## Documentation Index
> Fetch the complete documentation index at: https://docs.starknet.io/llms.txt
> Use this file to discover all available pages before exploring further.

# core::num::traits::ops::pow::Pow

Raises a value to the power of `exp`.
Note that `0⁰` (`pow(0, 0)`) returns `1`. Mathematically this is undefined.

## Signature

```rust theme={null}
pub trait Pow
```

#### Panics

Panics if the result of the exponentiation operation overflows the output type.

## Examples

```rust theme={null}
use core::num::traits::Pow;

assert!(2_i8.pow(4_usize) == 16_i8);
assert!(6_u8.pow(3_usize) == 216_u8);
assert!(0_u8.pow(0_usize) == 1_u8);
```

## Trait functions

### pow

Returns `self` to the power `exp`.

#### Signature

```rust theme={null}
fn pow(self: Base, exp: Exp) -> PowOutput
```

## Trait types

### Output

The type of the result of the power calculation.

#### Signature

```rust theme={null}
type Output;
```
