Skip to content

shril/CubicEquationSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Cubic Equation Solver

Useful Information about the script :

  • Used as a subsitute of np.roots() function which utilizes Eigen Value Matrix Method for finding roots of the polynomial.

  • ~6x faster than np.roots but exclusive to cubic polynomials.

  • Manages the issue of inherent in the power basis representation of the polynomial in floating point numbers.

  • Time Complexity of snippet is O(1).

Algorithm Link

Sample Code

import CubicEquationSolver
CubicEquationSolver.solve(1, 0, 1, 0)
Output: [ 0.+0.j  0.+1.j -0.-1.j]

About

Python Script to find the roots of a Cubic Equation

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages