this post was submitted on 12 Dec 2023
857 points (96.4% liked)

Memes

45751 readers
1811 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS
857
6÷2(1+2) (programming.dev)
submitted 11 months ago* (last edited 11 months ago) by [email protected] to c/[email protected]
 

https://zeta.one/viral-math/

I wrote a (very long) blog post about those viral math problems and am looking for feedback, especially from people who are not convinced that the problem is ambiguous.

It's about a 30min read so thank you in advance if you really take the time to read it, but I think it's worth it if you joined such discussions in the past, but I'm probably biased because I wrote it :)

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 0 points 8 months ago* (last edited 8 months ago)

FACT CHECK 2/5

The behaviour is intended and even carefully documented in the manual

...and yet still a bug (I saw at least one other person point this out to you)

A few years ago, there was a Microsoft feature intended for people in China, but people who weren't in China were getting that behaviour. i.e. a bug. It was documented and a deliberate design choice for people in China, but if you weren't in China then it's a bug. Just documenting a design choice doesn't mean bugs don't happen. A calculator giving a wrong answer is a bug

weak juxtaposition is only used by old calculators

Based on the comments in the above video, the opposite is true - this problem first arose in '96

because they are scientific calculators.

So the person programming it is far more likely to need to check their Maths first - bingo!

TI (Texas Instruments) also has some calculators that use strong juxtaposition and some products that use weak juxtaposition

...and some that use both! i.e. some follow Terms but not The Distributive Law. As I said to begin with, these are 2 DIFFERENT rules, and you can't just lump them together as one

evaluate 1/2X as 1/(2X)

Which is correct, as per Terms

while other products may evaluate the same expression as 1/2X from left to right

What you mean is they evaluate it as 1/2xX, since 1/2X and 1/(2X) are the same thing

it would be necessary to group 2X in parentheses

No, not necessary, since 2a=(2xa) by definition, alluded to in Cajori in 1928...

Sharp is a bit of an exception here, because all their other scientific calculators seem to

...follow all the rules of Maths, always. There's something to be said for making sure you're doing it right. :-)

Google uses the same priority for explicit and implicit multiplication

...and they will actually remove brackets I have put in and replace them with their own ("hi" to all the people who say you can fix any calculator by "just add more brackets" - Google doesn't CARE what brackets you've added!)

Desmos and GeoGebra try to force the user into using fractions (which is a good design decision if you ask me)

It's not, because a ÷ isn't a fraction bar. They're joining 2 terms into one and thus sometimes changing the answer

A lot of other tools like programming languages, spreadsheets, etc. don’t allow implicit multiplication syntax at all

It's not that they don't allow it, it's that it's not provided with the language by default in the first place! Most languages only provide you with some numbers, operators, and a few functions (like round), and it's up to the programmer to implement the rest. Welcome to why there are so many wrong e-calculators

let you choose if you want weak or strong juxtaposition

...which is a red flag to not use that calculator!

This gives you more control about how you like the calculator to behave in these situations

I'm not sure it does. I'd have to switch on "strong juxtaposition" (the only kind there is) and see what else has been disobeyed in Maths. e.g. Google removing my brackets and adding different ones

Wolfram|Alpha only uses strong juxtaposition between named variables, but weak juxtaposition for everything else. This might seem strange and inconsistent at first but is probably the least surprising behaviour for most people

I find any exceptions to following the rules of Maths surprising! No, you can't just make up your own rules

many textbooks, “a/bc” is intended to denote a/(bc)

a/bc=a/(bc) in every textbook

Wolfram Language, it means (a/b)×c

Welcome to "we're gonna add brackets to what you typed in and change the answer"

a multiplication sign has been omitted

...then that means it's not "multiplication" - it's Terms and/or The Distributive Law. The "M" in the mnemonics refers literally to multiplication signs, nothing else

Multiplication and division have the same priority, they are “mathematically speaking” the same operation. This also applies to addition and subtraction. One is just the inverse function of the other

Yep, and The Distributive Law and Factorising are the inverse of each other

no rule about “multiplication before division” or “division before multiplication” they always have the same priority

...and Brackets is always first, so in this case it doesn't even matter

In no way do any of the mnemonics represent any standard or norm in mathematics

Yes they do - mnemonics represent the actual order of operations rules

most children don’t become mathematicians later in life and if they do, they will learn all the other important stuff about the order of operations later

No, they won't. Year 8 is the last time order of operations is taught, and they have been taught everything they need to know about it by then

it’s hard to pump so much knowledge into children and teenagers

...and yet have you not noticed that teenagers almost never get this wrong - only adults do

Using “PEMDAS” to argue about the order of operations in mathematics

...is a totally valid thing to do. The problem is people classifying Distribution (Brackets/Parentheses with a coefficient) as "Multiplication", when there's literally no multiplication sign

Math notations and conventions evolve exactly like natural languages

No they don't. Maths is universal

A lot of it is heavily based on historical thanks and work from previous generations

It's all based on definitions and proofs, which are immutable

There is no definitive norm, standard or convention of notations and order of operations

You can find them in any high school textbook in your country (notation varies by country, but the rules don't)

some words only appear in half of them (like “implicit multiplication by juxtaposition”)

"implicit multiplication" doesn't appear in any Maths textbooks

sentences like “I saw the man with the telescope”, because it’s not clear if you saw him through the telescope or saw him holding (or looking through) a telescope

Yes it is clear (as I think I saw someone already point out here)

I saw the man with the telescope - the man has the telescope

I saw the man, with the telescope - I saw the man through a telescope

I saw the man through the telescope - I saw the man through a telescope

it should also be clear why there are no arguments or proofs for any side

But there are proofs! (There you go again with the "there is no..." red flag) Order of operations proof