pub type FqVar = FpVar<Fq>;Aliased Type§
enum FqVar {
Constant(Fq),
Var(AllocatedFp<Fq>),
}Variants§
Constant(Fq)
Represents a constant in the constraint system, which means that it does not have a corresponding variable.
Var(AllocatedFp<Fq>)
Represents an allocated variable constant in the constraint system.
Trait Implementations§
Source§impl FqVarExtension for FqVar
impl FqVarExtension for FqVar
Source§fn isqrt(&self) -> Result<(Boolean<Fq>, FqVar), SynthesisError>
fn isqrt(&self) -> Result<(Boolean<Fq>, FqVar), SynthesisError>
Inverse square root in R1CS
Cases:
- Case 1:
(true, sqrt(num/den))ifnumanddenare both nonzero andnum/denis square; - Case 2:
(true, 0)ifnumis zero; - Case 3:
(false, 0)ifdenis zero; - Case 4:
(false, sqrt(zeta*num/den))ifnumanddenare both nonzero andnum/denis nonsquare;