Module poly
[frames] | no frames]

Module poly

Polynomials, with addition, multiplication, and roots.

Classes
  Polynomial
Represent polynomials, and supports addition, subtraction, and root finding.
Functions
 
fixType(n)
If n is an integer, convert to a float, but leave complex as complex.
 
assertSameLength(a, b)
Generate an error if the arguments do not have the same length
 
vectorAdd(a, b)
Returns: (a[1]+b[1], ..., a[n]+b[n])
 
prettyTerm(coefficient, power, var='z')
 
prettyNum(value)
Variables
  __package__ = None
Function Details

vectorAdd(a, b)

 
Parameters:
  • a, b - lists of numbers of the same length
Returns:
(a[1]+b[1], ..., a[n]+b[n])