What sorts of algorithms would be used to do this (as in, this is a string, and I want to find the answer):
((5 + (3 + (7 * 2))) - (8 * 9)) / 72
First convert the expression into prefix or postfix form. Then its very easy to evaluate!
Example:
Postfix expression evaluation.