Polynomial
  • 27 May 2022
  • 1 Minute to read
  • Dark
    Light
  • PDF

Polynomial

  • Dark
    Light
  • PDF

Article Summary

Given a list of numbers such as \[a, b, c\], calculates the sum c*x⁰ + b*x¹ + a*x². If there are more elements in the list, the series is continued.

If the given list is empty, returns 0.

Function signature

POLYNOMIAL(xvalue: Number, coefficientsa: Array) => Number
ParameterDescription
X valueThe input value to the power series.
Coefficients AThe coefficients by which each successive power of x-value is multiplied.

Examples

FormulaReturn value
POLYNOMIAL(10, [1, 3, 9])139
POLYNOMIAL(5, [1, 3, 9])49
POLYNOMIAL(-5, [1, 3, 9])19
POLYNOMIAL(5, [-1, 3, 9])-1
POLYNOMIAL(10, [1])1
POLYNOMIAL(10, [])0

Was this article helpful?

What's Next