pub(crate) fn reduce<L: Limbs>(
log_2_bound: u32,
a: L,
b: (Choice, L),
c: L,
) -> (L, (Choice, L), L)Expand description
Reduce an element.
For a positive definite binary quadratic form (a, b, c) such that:
b^2 - 4ac = deltawheredelta < 0(the form is well-defined for a negative discriminant)- $delta \cong 1 \mod 2$
0 <= a, c(a, caren’t negative, as enforced by the type system)floor(log_2(a)) + 1 <= log_2_boundfloor(log_2(|b|)) + 1 <= log_2_boundceil(log_2_bound / Limb::BITS) <= <L as AsRef::<[Limb]>>::as_ref(&a).len()<L as AsRef::<[Limb]>>::as_ref(&a).len() <= <L as AsRef::<[Limb]>>::as_ref(&b.1).len()<L as AsRef::<[Limb]>>::as_ref(&a).len() == <L as AsRef::<[Limb]>>::as_ref(&c).len()
Yield the reduced equivalent form (a', b', c') such that:
|b'| <= a' <= c'b' >= 0if(|b'| == a') || (a' == c')gcd(a, b, c) = gcd(a', b', c')
b.0, b'.0 are true if the value is positive.
delta is bound to be negative and specified via its absolute value in
negative_discriminant_abs.