mastodon.gamedev.place is one of the many independent Mastodon servers you can use to participate in the fediverse.
Mastodon server focused on game development and related topics.

Server stats:

5.4K
active users

ConditionalCoder

Why am I only just now realising that:

15 - 5 - 1 = 9

while:

15 - (5 - 1) = 11

When an expression has addition/subtraction as well as multiplication/division, I always understood the need for brackets around the +/- to prioritise them (). I just never realised it also changed the value of expressions that *only* use subtraction... 🤯

@ConditionalCoder
The phrase you may be looking for is "non-associative".
Also, note the difference between the binary operation of subtraction and the unary property of negativeness for which we use same symbol.

(+15) - (+5) - (+1) = (+9)
(+15) + (-5) + (-1) = (+9)

(+15) - ( (+5) - (+1) ) = (+11)
(+15) - ( (+5) + (-1) ) = (+11)

Another fun example of non-associativity is in exponentiation. :-)
en.wikipedia.org/wiki/Associat
#maths #arithmetic #algebra #mathematics

en.wikipedia.orgAssociative property - Wikipedia