[-] SmartmanApps@programming.dev 1 points 2 years ago

(a)(b) basically means a*b.

Actually it's (axb), since a(b+c)=(ab+ac). This is where a lot of people go wrong in the order of operations questions you see on socials - removing the brackets too soon. 1/ab=1/(axb) NOT 1/axb. If a=2 and b=3 then 1/ab=1/(2x3)=1/6, but 1/axb=1/2x3=3/2. Note that this also means it gets solved in the Brackets step of order of operations, NOT the "Multiplication" step (another common mistake).

If there is no operator though, it is assumed multiplication

It's not "multiplication", it's a Product, a single number written as a product of factors. If a=2 and b=3 then ab is 6 written as the product of 2 and 3. ab=(2)(3)=(2x3)=6. axb=ab, 2x3=6, axb=2x3, ab=6.

"I’m unsure why that is."

To show it's a single number, not 2 separate numbers to be multiplied. Think of things like F=ma. You have to show that ma is a single number (equal to the Force), not 2 separate numbers multiplied., mxa. If you were doing something like dividing by the Force, then you have to have 1/ma=1/(mxa), NOT 1/mxa.

4
6
1
10
1
5
8
2
1
1
8
3
[-] SmartmanApps@programming.dev 1 points 2 years ago* (last edited 2 years ago)

I’m taking about physical, non-graphic scientific calculators from the 1990s.

Yep, exact same as the calculator in the linked thread. The expression entered was 6÷2(1+2).

[-] SmartmanApps@programming.dev 1 points 2 years ago* (last edited 2 years ago)

8/2(1+3) even if they technically are meant to be evaluated the same

But 8/2(1+3) isn't a fraction. The / - the computing equivalent of ÷ (which can only be written using Unicode on a computer, so a bit of a pain to use compared to / )- is an operator, which means they're 2 separate terms. A fraction bar is a grouping symbol, which means it's 1 term. In this particular case it doesn't matter, but if it appeared in a bigger expression then it absolutely does matter. The way to write 8/2(1+3) as a fraction inline is to add extra brackets. i.e. (8/2(1+3)) - because brackets are also a grouping symbol.

And as for distributive law vs multiplication, maybe this is just taking for granted a thing that I learned a long time ago, but to me they’re just the same thing in practice

Bu they're not, for the same reason. Firstly, the Distributive Law isn't multiplication at all - which only applies literally to multiplication symbols - it applies to bracketed terms (i.e. is a single term which needs to be distributed) - and secondly it applies to a single term, whereas multiplication applies to 2 terms (one before and one after). Anyone who talks about 2(1+3) needing to be "multiplied" has already made the mistake that is going to lead to a wrong answer (unless they just happen to "multiply" before they divide, which is an accidental way to get the right answer).

if I was factoring something

Indeed, that is the precise reason the Distributive Law exists - they are the opposite operation to each other! Anyone who adds a multiplication symbol has broken up the factorised term, again leading to the wrong answer.

I’m just being a bit lose with the terminology

Yeah, and that's all I was pointing out in the first place - please don't use "implicit multiplication". The term itself - i.e. it includes "multiplication" - leads people to do it wrong (because they treat it as multiplication, not brackets, then argue about the precedence of "multiplication"!). It needs to die!

this can rapidly get unreadable once you nest more than a few parens,

Well that's why the rules of Terms ab=(axb) and The Distributive Law a(b+c)=(a*(b+c))=(ab+ac) exist to begin with - less brackets! :-) Imagine having to write a fraction as (1/(axb)) all the time!

(8)/(2(1+3)) is obviously different than (8/2)(1+3)

Correct, though a lot of people treat it as the latter (yet another way to do it wrong - doing division before brackets) because they figure the 8/2 is "outside the brackets", but in fact only the 2 is, because the slash separates them as being 2 terms.

[-] SmartmanApps@programming.dev 1 points 2 years ago

We agree that the two situations are separate

Ok, that's a start.

but the first result is 4 ÷ a the second result is 4a

Exactly! So when a=2 then 4÷a=2, and 4a=8, which isn't the same thing. Welcome to why 2a and 2xa (and therefore also 2.a) aren't the same thing.

I use the dot as an expression of the same term rather than separate.

But that is incorrect. A dot is used for multiplication. i.e. it separates terms. If you use a . for 2.a, then you are writing the same thing as 2xa, not the same thing as 2a.

This is matter of my notational convention

Well, that's fine enough if you keep it to yourself, but don't use it in anything anyone else is going to read, or you're going to run into the issues I just pointed out

[-] SmartmanApps@programming.dev 1 points 2 years ago

“Wrong answers” only according to our current order of operations

No, according to arithmetic.

math still works if you, for example, make additions come first

No, it doesn't - order of operations proof. The only way it could work with addition first is if we swapped the definitions of addition and multiplication around... but then we still have the same order of operations, all we've done is swapped around what we call addition and multiplication!

there is no ‘high truth’ behind it.

There is when it comes to order of operations.

[-] SmartmanApps@programming.dev 1 points 2 years ago

That proof for the order of operations sure seems to rely a lot on our current order of operations

Doesn't use order of operations at all. It only uses the definitions of the operators. i.e. 3x4=3+3+3+3 by definition. i.e. nothing to do with order of operations.

If I have 1 2l bottle of milk, and 4 3l bottles of milk, how many litres of milk do I have? It can be solved by simply adding them up - again, nothing to do with order of operations here, just simple addition. Now, write it out as a mathematical expression which uses multiplication, and tell me which order of operations gets you the right answer. Voila! Welcome to how we worked out what the order of operations rules had to be.

[-] SmartmanApps@programming.dev 1 points 2 years ago* (last edited 2 years ago)

That would be 8/(2x(2+2)) if we were keeping it all in the denominator

(2x(2+2)) is the same thing as 2(2+2)

I have to respectfully disagree with your analysis

Which means you disagree with how Maths textbooks teach how to do this (see previous link).

[-] SmartmanApps@programming.dev 1 points 2 years ago

Please see this section of Wikipedia on the order of operations

That section is about multiplication, and there isn't any multiplication in this expression.

The “math” itself might not be ambiguous, but how we write it down absolutely can be

Not in this case it isn't. It has been written in a way which obeys all the rules of Maths.

This is why you don’t see actual mathematicians arguing over which one of these calculators is correct

But I do! I see University lecturers - who have forgotten their high school Maths rules (which is where this topic is taught) - arguing about it.

it is not either calculator being wrong

Yes, it is. The app written by the programmer is ignoring The Distributive Law (most likely because the programmer has forgotten it and not bothered to check his Maths is correct first).

US - PEMDAS vs UK - BODMAS

Those aren't the rules. They are mnemonics to help you remember the rules

notice division and multiplication swapped places

Yes, that's right, because they have equal precedence and it literally doesn't matter which way around you do them.

you can’t actually do all of the multiplication and division at one time

Yes, you can!

Some are taught to simply work left to right

Yes, that's because that's the easy way to obey the actual rule of Left associativity.

we are all taught to use parentheses correctly to eliminate ambiguity

Correct! So 2(2+2) unambiguously has to be done before the division.

[-] SmartmanApps@programming.dev 1 points 2 years ago

Yes

No.

8 / 2 (4) 8/(2x4) 8/8 1

[-] SmartmanApps@programming.dev 1 points 2 years ago

Yeah, I thought maybe you meant that, but I wasn't sure, and in any case I wanted to make clear it's totally worthless to use as a source for anything else (for the reasons I mentioned). :-)

[-] SmartmanApps@programming.dev 1 points 2 years ago

What’s |a|b|c|?

The absolute value of a, times b, times the absolute value of c (which would be more naturally written as b|ac|). Unlike brackets, there's no such thing as nested absolute value. If you wanted it to read as the absolute value of (a times the absolute value of b times c), then that's EXACTLY the same answer as the absolute value of (a times b times c), which is why nested absolute values make no sense - you only have to take absolute value once to get rid of all the contained signs.

[-] SmartmanApps@programming.dev 1 points 2 years ago

How to be inert.

Be alert - the world needs more lerts

view more: ‹ prev next ›

SmartmanApps

0 post score
0 comment score
joined 2 years ago
MODERATOR OF