pub(crate) fn reduce_to_upper_bound<L: Limbs>(
log_2_bound: u32,
a: L,
b: (Choice, L),
c: L,
upper_bound: u32,
) -> (L, (Choice, L), L)Expand description
Reduce an element until either its reduced or $|b| < 2^{upper_bound}$.
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 an equivalent form (a', b', c') such that:
(a', b', c')is reduced or $|b| < 2^{upper_bound}$.(a', b', c')is reduced orb' > a'
b.0, b'.0 are true if the value is positive.