5 ms·
This is really more of a graphical representation of a formula. It contains conditionals of sorts (in the form of the min operator), but no recursion, iteration
by phreeza 12y ago
This is really more of a graphical representation of a formula. It contains conditionals of sorts (in the form of the min operator), but no recursion, iteration or other sort of control structure.
- andrepd 12y ago"In mathematics and computer science, an algorithm [...] is a self-contained step-by-step set of operations to be performed." -Wikipedia It's a detailed recipe to perform a task, so it's an algorithm.
- Houshalter 12y ago>What this meant was the wording of the instructions would be procedural rather than declarative. Instead of “Your tax is 15 percent of the amount on line 42,” we had “Multiply the amount on line 42 by 0.15 and write the result on line 43.”
- murbard2 12y agoYes, it's an expression. The algorithm is evaluating that expression. However, algorithms also evaluate algorithms, and a better example would have been an actual algorithm that needs to be interpreted.