Find the roots of a polynomial.
Numeric.poly.root(input, roots = false, basis = 'poly')Finds root values or the derived root polynomial.
- Parameters:
input: Coefficients of the source polynomialroots: When true returns the derived root polynomialbasis: Polynomial basis of the coefficients
- Returns: Root values or coefficients of the root polynomial
- NumPy: Covers
np.polynomial.polynomial.polyroots,np.polynomial.polynomial.polyfromroots,np.polynomial.chebyshev.chebroots,np.polynomial.legendre.legroots,np.polynomial.hermite.hermroots,np.polynomial.hermite_e.hermeroots,np.polynomial.laguerre.lagroots,np.roots,np.polythrough a single Numerix method.
import Numeric from '@neabyte/numerix'
const values = Numeric.poly.root([1, -3, 2])
console.log(values)
// [0.5,1]import Numeric from '@neabyte/numerix'
const coefficients = Numeric.poly.root([1, -3, 2], true)
console.log(coefficients)
// [6,-7,0,1]import Numeric from '@neabyte/numerix'
const values = Numeric.poly.root([1, -2])
console.log(values)
// [0.5]import Numeric from '@neabyte/numerix'
const values = Numeric.poly.root([5])
console.log(values)
// []