Go Down

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

#### raron

#90
##### Apr 24, 2011, 04:44 pm
Well, most calculators are wrong then. Google+Wolfram says so

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   I didn't know it could handle that, pretty cool!
Including the multiplication yields 288 for Mr. W also.

#### raron

#91
##### Apr 25, 2011, 12:04 am
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

#### cyberteque

#92
##### Apr 25, 2011, 01:41 am
It's not ambiguous!

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

48/24 = 2

#### mowcius

#93
##### Apr 25, 2011, 01:43 am

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

#94
##### Apr 25, 2011, 03:24 am
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!

#### mowcius

#95
##### Apr 25, 2011, 03:32 am
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

#96
##### Apr 25, 2011, 03:57 am
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 pmLast 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.....

-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
>>> 48/2*(9+3)
288
>>>

#### Senso

#98
##### Apr 27, 2011, 06:14 pm
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

#99
##### Apr 27, 2011, 08:43 pm
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

#100
##### Apr 27, 2011, 10:23 pm
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

#101
##### Apr 27, 2011, 10:40 pm
Wouldn't the dolphins know?
Please post technical questions on the forum, not by personal message. Thanks!

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

#102
##### Apr 28, 2011, 12:18 amLast 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

#103
##### Apr 28, 2011, 12:50 am
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

#104
##### Apr 28, 2011, 01:28 am

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

Please enter a valid email to subscribe