do a simple maths problem

News and important info, general banter, and suggestions for 5punk

Moderator: Forum Moderators

deject
Berk
Berk
Posts: 10353
Joined: December 7th, 2004, 17:02
Location: Oklahoma City, OK, USA
Contact:

do a simple maths problem

Post by deject »

Do this maths problem. It's really easy, yet a surprising number of people get it wrong.

Solve this: 1 - 3 x 4 + 7 = __
FatherJack
Site Owner
Site Owner
Posts: 9597
Joined: May 16th, 2005, 15:31
Location: Coventry, UK
Contact:

Post by FatherJack »

I say -1. C++ would say -18 and a spreadsheet would say -4.
deject
Berk
Berk
Posts: 10353
Joined: December 7th, 2004, 17:02
Location: Oklahoma City, OK, USA
Contact:

Post by deject »

we're not talking about any sort of machine logic, just doing it the way you were taught to do arithmetic.
Baliame
Tremors Worm
Tremors Worm
Posts: 3491
Joined: October 13th, 2007, 23:43
Location: Hungary

Post by Baliame »

Code: Select all

1 - 3 * 4 + 7 = (-3 * 4) + 1 + 7 = -12 + 1 + 7 = 8 - 12 = -4
(this is not, in fact, a code)
C++ would likewise say -4 and a spreadsheet would definitely say -4.
Anyone who says otherwise should debate it on /b/.
spoodie
Site Moderator
Site Moderator
Posts: 9246
Joined: February 6th, 2005, 16:49
Location: Essex, UK

Post by spoodie »

-1 is my answer. It's been a long time since I learnt arithmetic but that seems the logical answer.

Baliame's answer seems to be the application of too much logic.
fabyak
Home-made Big Daddy
Home-made Big Daddy
Posts: 5681
Joined: October 14th, 2004, 14:02
Location: Oxford, England

Post by fabyak »

I'll go with -4

Multiplication and division take priority over subtraction and addition (with things in brackets taking highest priority)

/A-level maths
friznit
Heavy
Heavy
Posts: 5147
Joined: October 3rd, 2005, 21:51
Location: South of England
Contact:

Post by friznit »

I still remember BODMAS from Fucking Years Ago™. -4.
spoodie
Site Moderator
Site Moderator
Posts: 9246
Joined: February 6th, 2005, 16:49
Location: Essex, UK

Post by spoodie »

fabyak wrote:Multiplication and division take priority over subtraction and addition
As it's been a while for me, why is this?
fabyak
Home-made Big Daddy
Home-made Big Daddy
Posts: 5681
Joined: October 14th, 2004, 14:02
Location: Oxford, England

Post by fabyak »

spoodie wrote: As it's been a while for me, why is this?
Because you touch yourself at night
friznit
Heavy
Heavy
Posts: 5147
Joined: October 3rd, 2005, 21:51
Location: South of England
Contact:

Post by friznit »

It's just convention, so everyone knows to use the same order of operations applied to each variable without having to spam brackets everywhere:

Brackets
Order
Division
Multiply
Add
Subtract

Ed.: Note that Multiply/Div take the same precedence though.

Also, what Fab said.
ProfHawking
Zombie
Zombie
Posts: 2101
Joined: February 20th, 2005, 21:31

Post by ProfHawking »

I wouldnt be 100% sure how to do it unless it were in context.
I see three methods:

((1-3)*4)+7 = -1
1-(3*4)+7 = -4 I would go with this one personally
(1-3)*(4+7) = -22

If in doubt, use bracketspam :)
shot2bits
Zombie
Zombie
Posts: 2082
Joined: February 7th, 2005, 17:40
Location: england

Post by shot2bits »

ProfHawking wrote:I wouldnt be 100% sure how to do it unless it were in context.
I see three methods:

((1-3)*4)+7 = -1
1-(3*4)+7 = -4 I would go with this one personally
(1-3)*(4+7) = -22

If in doubt, use bracketspam :)

this is pretty much what i did in my head and i was about to post before i saw this, i came out with -1 from doing it how i would normally do maths and how i expect most people do instinctually due to the presentation of the question, then after rereading the question i saw the way to come up with -22 and then again i looked at it and saw the way for -4. i couldnt see any other it could work
spoodie
Site Moderator
Site Moderator
Posts: 9246
Joined: February 6th, 2005, 16:49
Location: Essex, UK

Post by spoodie »

I agree with Prof and I've made up a new thing for maths people to remember:

Explicit
Or
Shut
The
Fuck
Up
amblin
Zombie Spanger
Zombie Spanger
Posts: 2663
Joined: October 22nd, 2004, 11:50

Post by amblin »

.
Last edited by amblin on May 5th, 2014, 17:28, edited 1 time in total.
Dog Pants
Site Moderator
Site Moderator
Posts: 21653
Joined: April 29th, 2005, 13:39
Location: Surrey, UK
Contact:

Post by Dog Pants »

friznit wrote:It's just convention, so everyone knows to use the same order of operations applied to each variable without having to spam brackets everywhere:

Brackets
Order
Division
Multiply
Add
Subtract

Ed.: Note that Multiply/Div take the same precedence though.

Also, what Fab said.
This.

So:
1-3x4+7=X
1-((3x4)+7)=X
1-(12+7)=X
1-19=X
-18=X
buzzmong
Weighted Storage Cube
Weighted Storage Cube
Posts: 7167
Joined: February 26th, 2007, 17:26
Location: Middle England, nearish Cov

Post by buzzmong »

Multiplication has a higher precedence than anything else in this statement. Addition and subtraction have the same precedence as each other.

Bearing in mind this is an in-order operation, not pre or post order, therefore when faced with items on the same level, you go left to right.

So, 3x4 = 12

1 - 12 = -11

-11 + 7 = -4
Baliame
Tremors Worm
Tremors Worm
Posts: 3491
Joined: October 13th, 2007, 23:43
Location: Hungary

Post by Baliame »

Dog Pants wrote:This.

So:
1-3x4+7=X
1-((3x4)+7)=X
1-(12+7)=X
1-19=X
-18=X
I sincerely hope you're trolling. Where did the extra brackets come from?

Let's see. First of all, we're dealing with addition here. Multiplication takes precedence over addition and subtraction, therefore we're we have three operands, as subtraction can be considered as the addition of a negative number. Therefore, the equation can be written as:
(1) + (-3x4) + (7) = X
Note that the brackets do not make a difference in this case, they're only there for emphasis:
1 + -3x4 + 7 = X
Now, to remove all confusion, and to make it easier to understand, we will execute the multiplication.
1 - 12 + 7 = X
Knowing you all, this equation still has 3 equally probable outcomes but before those rusty cogwheels start cranking again let's do the additions (and subtraction).
X = -4

If you're wondering why I'm bitter about this, I saw the exact same conversation go down on 4chan, except there people were actually trolling.
Last edited by Baliame on June 18th, 2010, 11:45, edited 2 times in total.
Dog Pants
Site Moderator
Site Moderator
Posts: 21653
Joined: April 29th, 2005, 13:39
Location: Surrey, UK
Contact:

Post by Dog Pants »

I just wanted to be different, but hey thanks for calling me retarded. Now go post all that on 4chan.
Baliame
Tremors Worm
Tremors Worm
Posts: 3491
Joined: October 13th, 2007, 23:43
Location: Hungary

Post by Baliame »

Okay, that may have been a little harsh :ninja:

But I find it a troubling question now that I think about it, I think I wasted 12 years of my life so far learning things I most likely won't even want to remember.
spoodie
Site Moderator
Site Moderator
Posts: 9246
Joined: February 6th, 2005, 16:49
Location: Essex, UK

Post by spoodie »

I saw the exact same conversation go down on 4chan, except there people were actually trolling
That's because it's horrible site.

Personally I now understand the rules that are expected to be applied to this equation, but I still don't know why. It seems arbitrary. I don't particularly have much respect for this kind of pure maths logic.
Post Reply