Function algebraic_equation_over_finite_prime_field::solve_quadratic_equation [−][src]
pub fn solve_quadratic_equation<T>(a: T, b: T, c: T, p: T) -> (T, T) where
T: Sized + Clone + Eq + Ord + Zero + One + RingNormalize + for<'x> DivAssign<&'x T> + for<'x> RemAssign<&'x T> + Neg<Output = T> + From<u8> + SampleUniform,
for<'x> &'x T: Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T> + Rem<Output = T> + EuclideanRingOperation<T>,
Expand description
Solve: $ax^2 + bx + c ≡ 0 \pmod p
$
Requires: $p
$: odd prime, $\left(\frac{D}{p}\right)=1
$ where $D=b^2-4ac
$.