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

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

let a = CircuitElement::> {};
let inv_a = circuit_inverse(a);