Post Reply 
Order of operations - what is 6÷2(1+2) ?
12-12-2020, 01:30 PM
Post: #32
RE: Order of operations - what is 6÷2(1+2) ?
(12-12-2020 04:58 AM)toml_12953 Wrote:  
(12-12-2020 12:32 AM)Massimo Gnerucci Wrote:  So when you write x/2y what you really mean is (x*y)/2?
Luckily we have PEJMDAS!

Turns out that PEMDAS is quite a novelty and that its core fans are North American teachers...

Yes, to most programmers I know it means (x/2)*y.

Let x=4, y=7
if you use a computer to print the result, you get 14. Most computer languages don't allow implied multiplication so in order to write it as it's written without introducing parentheses, we'd write it as

x/2*y

We have no juxtaposition. Mathematicians might but us computer programmers don't.

We are talking about math, not about computer programmed to sort it out.
Do you think like a computer when you read a formula on a textbook?

You have to write it down in such a way that other humans should be able to decode it as you meant, after that they could even program a computer in order to solve that formula.

And you are not the only programmer hereabout. ;)

Greetings,
    Massimo

-+×÷ ↔ left is right and right is wrong
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Order of operations - what is 6÷2(1+2) ? - Massimo Gnerucci - 12-12-2020 01:30 PM



User(s) browsing this thread: 1 Guest(s)