Skip to main content

field_neg

Function field_neg 

Source
pub fn field_neg<const LIMBS: usize>(
    a: &FieldElement<LIMBS>,
    p: &[u64; LIMBS],
) -> FieldElement<LIMBS>
Expand description

Negate: result = (-a) mod p = p - a if a != 0, else 0.