Skip to content

hellofromtonya/Quadratic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Quadratic

PHP classes for working with, and solving, quadratic equations.

Status

This is a work in progress to share and update some PHP I wrote to solve quadratic equations. The code in solver.php is from 2004 - very procedural, no classes, no namespaces, no composer etc. The plan is to update this code to fix all that, with a Gamajo\Quadratic\Equation class and a Gamajo\Quadratic\Solver class.

What Is A Quadratic Equation?

A quadratic equation is a univariate polynomial with degree of 2, that is then set to equal zero so that the indeterminate can be determined:

ax2 + bx + c = 0

Equations can often be solved with factoring or completing the square, but there is also a Quadratic Formula:

X equals negative B, plus or minus the square root of B squared minus four A C, all over two A

The function in solver.php accepts values for a, b and c and returns one or both roots if they could be determined.

About

PHP classes for working with, and solving, quadratic equations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 100.0%