» Metadata  » Status 



» Description  
*** This is a reproposal of the original Math_Polynomial package I proposed which was short 1 vote. A number of people either told me they would have voted but were on vacation/work/holiday/etc. or told me I should rework some things and repropose, so here it is. I made the following changes people requested:  License changed to BSD license ( Justin Patrin, Joshua Eichorn )  Remove the .class from the filenames. ( Justin Patrin, Firman Wandayandi )  Use is_a() instead of get_class() ( Justin Patrin, Arnaud Limbourg )  Lots of coding style issues ( Lots of people... )  return as language construct ( Justin Patrin )  "and" should be &&, "or" should be  ( Justin Patrin )  Use 'single quotes' instead of "doubles" ( Justin Patrin )  Estimation of roots for highdegree Polynomials using Math_Numerical_RootFinding  Use PEAR::raiseError() for error handling ( Justin Patrin ) I looked at the other Math classes and I really like Jesus Castagnetto's classes with a data type class and an operations class. That said, the API for this class now closely mirrors what he's done with his classes, providing a Polynomial class and a PolynomialOp class with static methods. *** A math package to represent and manipulate polynomials ( equations of the form ax^n + bx^(n  1) + ... yx + z, or, for example: 5x^3 + 6x^2 + 4x + 2 ) The class follows the API of other packages in the Math category, with a Polynomial class to represent the data and a PolynomialOp class for operations on the Polynomials. The PolynomialOp class has methods for common operations on Polynomials, including:  add() Add Polynomials together  mul() Multiply " "  sub() Subtract a polynomial from another  div() Divide one polynomial by another  mod() Mod operation for Polynomials  getRoots()  getCriticalPoints()  getDerivative() Get the Nth derivative of the Polynomial  getTangentAt() Get a tangent to the polynomial at a given x coor.  evaluate() Get the y value for a given x value  getSlopeAt() Get the slope at a particular point  etc. etc. etc. Example usage: 

» Dependencies  » Links 


» Timeline  » Changelog 

