pub fn textbook_square(builder: &CircuitBuilder, a: &BigUint) -> BigUintExpand description
Square an arbitrary-sized BigUint using textbook algorithm.
Computes a * a using an optimized algorithm that takes advantage of the symmetry
in squaring (each cross-product appears twice). This is roughly twice more efficient
than using textbook_mul, though still quadratic in the number of constraints.
§Arguments
builder- Circuit builder for constraint generationa- TheBigUintto be squared
§Returns
The square of a as a BigUint with 2 * a.limbs.len() limbs