Index Mathematics Conjectures nbv lettuce Widgets

vec_polynomial_coef_mul

stdlib/polynomial/vec_polynomial_coef_mul.nbv

vec_polynomial_coef_mul(static N, lhs, rhs)

multiply two vectors of polynomials. Each polynomial should be in coefficient form

first argument should be the degree of the polynomial ring

Calls
polynomial/polynomial_coef_mul, slice
Precompiles
assert_eq!, clone!, div_exact!, len!, loop_flat_map!

Source

# multiply two vectors of polynomials. Each polynomial should
# be in coefficient form
#
# first argument should be the degree of the polynomial ring
(static N, lhs, rhs)

assert_eq! (len! lhs), (len! rhs)

static iter_len = div_exact! (len! lhs), N

loop_flat_map! iter_len, i {
  let lhs = slice((clone! lhs), i * N, N)
  let rhs = slice((clone! rhs), i * N, N)
  polynomial_coef_mul(lhs, rhs)
}