Advertisement

All Jokes aside, what is 6/2(1+2)?

Started by March 27, 2015 12:00 AM
115 comments, last by BaneTrapper 9 years, 9 months ago

Crazy thing is Nypyren, I believe these people were serious in their answers. This is Linkedin, so you would assume people would give educated answers for potential employers. All of their posted credentials point to one thing, but the answers posted (with justifications) threw me off.

One person ended with 6/3 = 2

Another person got 6/23 = 0.2...

Maybe the fact that accountants were the main ones getting it wrong is the answer to why Wall Street went bust.

They call me the Tutorial Doctor.

6 / 2 ( 1 + 2 )


Microsoft Excel says there's a typo in that equation. It assumes you want a * after the first 2 and before the parenthetical, and if you accept that you get 9.

I think the equation would be clearer if it had another set of parentheses in it.

-- Tom Sloper -- sloperama.com

Advertisement


6 / 2 * ( 1 + 2 )

You modified his equation. It was originally 6/2(1+2) which makes a difference in this case. No longer speaking directly to Nyphren... The fact is that this can be evaluated using more than one convention and those two convention yield different results. You might think one of these conventions is the "right" convention, but that is just your opinion. Unless you can get everyone in the world to agree then an equation like this will always be ambiguous unless you specifically state which convention you are expecting people to use.

Microsoft Excel says there's a typo in that equation. It assumes you want a * after the first 2 and before the parenthetical, and if you accept that you get 9.

.

Same issue with Python 2.7 ... same with Java


print (6 / 2 * ( 1 + 2 ) );

System.out.println( 6 / 2 * ( 1 + 2 ) );

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson

Wow, this is reminding me of the dress issue. But this is math! It is very concise. How is it left to interpretation? The equation was shown as a photo using a division sign instead of forward slash, but still.

I don't see how there is division over it.

P.S. I won't disclose my answer until I see where everyone is, and at least reasoning behind it.

By the way, now 6 is in the bag. haha.

They call me the Tutorial Doctor.

Wow, this is reminding me of the dress issue. But this is math! It is very concise. How is it left to interpretation? The equation was shown as a photo using a division sign instead of forward slash, but still.

I don't see how there is division over it.

P.S. I won't disclose my answer until I see where everyone is, and at least reasoning behind it.

By the way, now 6 is in the bag. haha.

That dress was only ever blue and black in reality. No such reality exists for this equation.

Advertisement

...always be ambiguous unless you specifically state which convention you are expecting people to use.


(Insert reductio ad absurdum here...)


You modified his equation. It was originally 6/2(1+2) which makes a difference in this case. No longer speaking directly to Nyphren... The fact is that this can be evaluated using more than one convention and those two convention yield different results.

Which convention yields an answer different than 9?

Also, I'm not sure what python, java or excel have to do with anything. Those weren't mentioned in the original question, and whether or not an algebraic expression corresponds to a programming language's syntax seems irrelevant (other than to imply that the question not: "what does this evaluate to in excel, java, etc...").

Nein

The rules of order of operations dictates brackets, multiplication, division, addition and than subtraction .

Please acknowledge the corrections others have made—this is exactly what a programmer can absolutely not afford to misunderstand.
Multiplication, division, and modulus have the same priority and are executed in order of appearance.
Addition and subtraction follow have the same priority, again whichever comes first.

9 is the correct answer.
The only confusing thing is that the multiplication is not explicit, which left me wondering if it should be 6÷2(1+2) or 6÷2×(1+2).

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

This topic is closed to new replies.

Advertisement