Jump to content

Mistake in Manual or Im too stupid??


Tavadi

Recommended Posts

So I was reading editors manual and Im pretty confused about following sentence:

 

'However, operations are done from right to left, instead of the usual left to right (so 9 – 3 – 3 is 0, not 3, because the subtraction on the right is done first).'

 

Ok dont tell me why its right to left, lets leave it, but HOW is '9 – 3 – 3 = 0'??

Please someone explain to me.

Link to comment
Share on other sites

It's not. This is an error in the docs. The point is to put parentheses around EVERYTHING, rather than relying on normal Order of Ops to save you.

 

9 - (3 - 3) = 9

(9 - 3) - 3 = 3

9 - 3 - 3 = ????

 

I haven't tried the last one, but it really doesn't matter. Don't leave numbers naked. Use parentheses. That's all it's trying to say.

Link to comment
Share on other sites

The terms are just being evaluated from right to left. Usually, 1+2+3 means

(1+2)+3 because it is done left to right

But with Jeff's system it is

1+(2+3)

 

2+3*6 usually means

2+(3*6) because of order of operations, and it should still apply in Jeff's system

 

But that is an error in the docs because 9-3-3 should be 9+(-3-3) which is 3.

Link to comment
Share on other sites

But then you have to consider that the statement also said 9-3-3=3! (9-3)-3 is so very different from 9-(3*3).

 

In reality, the direction of interpretation shouldn't matter as long as the order of operations apply, (Addition, Subtraction, Multiplication, Division; the positive operator must always have precedence)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...