Difference between formula and algorithm
An algorithm is in its most general definition: a way of achieving a desired goal. Formula are merely recipes or components.
Example: The actual method of baking bread with steps is an algorithm:
- get ingredients
- mix ingredients
- put in oven
- cook until certain time at certain temperature
- take out and wait till cools
in here would be formula such as the formula for the bread, what ingredients etc...
The quadratic formula is just that: a formula for solving quadratic equations
An example of an algorithm for solving quadratics would be:
get quadratic: call a the coefficient in front of x^2, b the coefficient in front of x and c the constant coefficient.
evaluate quadratic formula (both + and - versions) on given a, b and c
simplify
This algorithm solves the actual problem... whereas the formula is a tool used in the process.
An algorithm is a method for solving a problem, but a formula is a sequence of numbers and symbols corresponding to a word in a language. The quadratic formula is an algorithm, because it is a method for solving quadratic equations. Algorithms may not even involve math, but formulas almost exclusively use numbers.