/// Polynomial evaluation for small polynomials; this will overflow and panic if
/// used for large values.
Polynomial evaluation for small polynomials; this will overflow and panic if
used for large values.
Polynomial evaluation for small polynomials ; this will overflow and panic if used for large values .
pub fn evaluate_integer_polynomial(x: u32, polynomial: &[u32]) -> u32 {
    let mut ans = 0u32;
    let mut power = 1u32;
    for coefficient in polynomial {
        ans += power * coefficient;
        power *= x;
    }
    ans
}
pub fn evaluate_integer_polynomial ( x : u32 , polynomial : & [ u32 ] ) -> u32 { let mut ans = 0u32 ; let mut power = 1u32 ; for coefficient in polynomial { ans += power * coefficient ; power *= x ; } ans }
Polynomial evaluation for small polynomials; this will overflow and panic if
used for large values.
Polynomial evaluation for small polynomials ; this will overflow and panic if used for large values .
x
u32
polynomial
&[u32]