Skip to main content

halve_mod_p

Function halve_mod_p 

Source
fn halve_mod_p(a: FieldElement) -> FieldElement
Expand description

Halves a field element modulo p.

Computes a / 2 mod p. If a is odd, adds p first to make it even, then shifts right.