The Divisor Method
By rhodium
Wed, 29 Sep 2004
- 590 reads
The Divisor Method
By Salim Meghani
Suppose you have the expression : 1+1*2/2+2*2
If you evaluate it left to right (without precedence) you
get:
1+1*2=4/2=2+2=4*2=8.
If you subtract : 1+1 (from it because 2/2=1) the answer is
6, which is the precedence way of evaluating it.
If the divisor was a fraction, then you would take that away
instead from the left to right evaluation.
For example: 1+1*1/2+2*1 - in this case you would take away 0.5
instead.
I think it works, check it out!
- Log in to post comments


