> ## 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::circuit::circuit_inverse

Creates a new circuit element representing the multiplicative inverse modulo p of an input
circuit.
This function creates a new circuit element representing the multiplicative inverse of the input
element modulo the circuit's modulus. The operation will fail during evaluation if the input
is not invertible (not coprime with the modulus).

## Signature

```rust theme={null}
pub fn circuit_inverse>(
    input: CircuitElement,
) -> CircuitElement>
```

#### Arguments

* `input` - Circuit element to compute the inverse of

#### Returns

A new circuit element representing `input^(-1) mod p`

## Examples

```rust theme={null}
let a = CircuitElement::> {};
let inv_a = circuit_inverse(a);
```
