Polynomial
- 27 May 2022
- 1 Minute to read
- DarkLight
- PDF
Polynomial
- Updated on 27 May 2022
- 1 Minute to read
- DarkLight
- 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
Parameter | Description |
---|---|
X value | The input value to the power series. |
Coefficients A | The coefficients by which each successive power of x-value is multiplied. |
Examples
Formula | Return 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?