Go Down

Topic: 48÷2(9+3) = ? (Read 8441 times) previous topic - next topic

raron

Well, most calculators are wrong then. Google+Wolfram says so :P

Never occurred to me before though, that the implied multiplication of a parenthesis have a higher priority than the usual multiplication/division priority. A bug? On all those calculators?

Btw the same goes for implied multiplication of variables. On my casio, if I set A=12 (or 9+3 if you will), and then do
48/2A
I get 2. But if I do
48/2*A
I get 288.

Btw#2: Wolfram got 2 there too :P  I didn't know it could handle that, pretty cool!
Including the multiplication yields 288 for Mr. W also.

raron

Quote
It is a genuine, gold-plated, certificated ambiguous question.

Hehe ok.

Quote
Prudent programmers simply don't use such sloppy coding.

Must be why this didn't really occur to me before :P

cyberteque

It's not ambiguous!

You treat 2(9+3) as a "term".

48/24 = 2


mowcius


It's not ambiguous!

You treat 2(9+3) as a "term".

48/24 = 2

Wrong.

It's ambiguous - there is no 'right answer' to this.

cyberteque

Say what?

It's, wait for it peeps....

ALGEBRA

There are very definite rules to follow, rules that are internationally agreed upon.
This was never a programming question, it was always an algebra problem.

Rather than run off and look at the first site google spat out, I asked a couple of people with PhD's in maths, physics, accounting and economics.
Ok, the economics prof was kinda vague, but hey, it's not like a real science anyway!

I let the Math prof read this topic last night and she was still laughing about this morning!


mowcius

Quote
There are very definite rules to follow, rules that are internationally agreed upon.

Unfortunately in this case there aren't specific rules to follow apart from saying that the question is bogus as it's missing an operator and most likely some other stuff to be on the safe side.

westfw

Quote
This was never a programming question, it was always an algebra problem.

Says who?
If it was algebra, it wouldn't have used a "division sign."  (come to think of it, not many programming languages have that either.)
Both of these are fine:
   48
-------  (9+3)
   2
and
   48
---------
  2(9+3)


Quote
You treat 2(9+3) as a "term".

Wikipedia says
Quote
In elementary mathematics, a term is either a single number or variable, or the product of several numbers or variables separated from another term by a + or - sign in an overall expression.

and this doesn't fit.  Why is that any more a term than (48/2)(9+3) ?  It's not a polynomial with multiplicative terms added together...
(although I'm inclined to agree that there would be less argument about 48÷2X
If it were algebra, you might automatically assume that simple constants were already simplified.)

Fletcher Chr

#97
Apr 27, 2011, 04:09 pm Last Edit: Apr 27, 2011, 04:24 pm by Fletcher Chr Reason: 1
I'll try to follow the rules from:
http://en.wikipedia.org/wiki/Operator_precedence


48/2(9+3) = ?
(implicit multiplication between 2 and the starting bracket)
=> 48/2*(9+3) = ?
(since no information about base is given the often used base 10 is assumed)
=> 48/2*(9+3) = ? , base 10
(Order no. 1 in precedence)
=> 48/2*12 = ? , base 10
(Order no. 2 in precedence)
=> 48/2*12 = ? , base 10
(Order no. 3 in precedence - diversion and multiplication has same rank - reading from left to right)
=> 288 = ? , base 10
(Order no. 4 in precedence)
=> 288 = ? , base 10
q.e.d.

Ohh.. Wolfram says 288 - I guess there is no reason to argue.....  :D :D :D

-Fletcher

Update: Python says 288 too:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> 48/2*(9+3)
288
>>>


Senso

Just add a rotational matrix, integrate the hell out of it, derive two or three times, do some quaternion calculation in that and then divide by 42.

Fletcher Chr

Quote
What does Python say with the equation exactly as originally stated?


More or less. The only bogus part of the question is the missing multiplication sign though without this sign the equation is not valid. Then it's a trick question and real answer = ø.

It it not right to evaluate 2*(9+3) first due to distributive law:
http://en.wikipedia.org/wiki/Distributivity

48/2*(9+3) = ?
=> (distributive law)
(48/2*9) + (48/2*3) = ?
=>
216 + 72 = ?
=>
288 = ?
q.e.d.

-Fletcher

CrossRoads

I can't believe this thread is still going.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Nick Gammon

Wouldn't the dolphins know?
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

CrossRoads

#102
Apr 28, 2011, 12:18 am Last Edit: Apr 28, 2011, 02:58 am by CrossRoads Reason: 1
Only if the answer was 42.

Course then the question would have to been: Please solve: 6 ( 8 )=?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

AWOL

Quote
Dolphino.  Water resistant to 10m.

Now I'm confused.
I know that I'm water resistant to rather more than ten metres, but when someone with a US call-sign says "10m", I wonder if they mean "ten miles", in which case, the Marianas Trench begins to look a little shallow.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Simpson_Jr


Quote
Dolphino.  Water resistant to 10m.

Now I'm confused.
I know that I'm water resistant to rather more than ten metres, but when someone with a US call-sign says "10m", I wonder if they mean "ten miles", in which case, the Marianas Trench begins to look a little shallow.


Nah... Call sign, Ham..., 10M, I Guess he's talking amateur shortwave radio, unless something like a 32.81 ft/10.936 yard band exists. At frequencies higher as 30 Mhz a dolphin may... start leaking, that's the problem.

Talking about radio, why is there no "Let's wait till SETI gives us the answer" in the poll ?

Go Up