Welcome, Guest. Please login or register.
July 22, 2025, 03:42:14 AM

Login with username, password and session length

Search:     Advanced search
we're back, baby
*
Home Help Search Login Register
f13.net  |  f13.net General Forums  |  General Discussion  |  Serious Business  |  Topic: 48÷2(9+3) 0 Members and 1 Guest are viewing this topic.
Pages: [1] 2 Go Down Print
Author Topic: 48÷2(9+3)  (Read 8647 times)
Samprimary
Contributor
Posts: 4229


on: April 08, 2011, 03:31:47 PM

What's the answer
Mosesandstick
Terracotta Army
Posts: 2476


Reply #1 on: April 08, 2011, 03:35:11 PM

Two?
Merusk
Terracotta Army
Posts: 27449

Badge Whore


Reply #2 on: April 08, 2011, 03:36:47 PM

Yeah, two.

The past cannot be changed. The future is yet within your power.
Ingmar
Terracotta Army
Posts: 19280

Auto Assault Affectionado


Reply #3 on: April 08, 2011, 03:37:24 PM

Either that or 288. I want to say due to order of operations you end up doing 48 divided by 2 multipled by 12. It has been like 25 years since I had to care about that sort of thing, though.

The Transcendent One: AH... THE ROGUE CONSTRUCT.
Nordom: Sense of closure: imminent.
Druzil
Terracotta Army
Posts: 550


Reply #4 on: April 08, 2011, 03:40:32 PM

288
Merusk
Terracotta Army
Posts: 27449

Badge Whore


Reply #5 on: April 08, 2011, 03:42:06 PM

Excel says 288.  I always forget to go left to right and multiply x() setups before they should be.  It's wrong but it just makes sense to me since there's no visual * sign there.  I never remember until someone points it out.. then I forget again a few days later. My fail.

The past cannot be changed. The future is yet within your power.
Trippy
Administrator
Posts: 23657


Reply #6 on: April 08, 2011, 03:43:19 PM

MuffinMan
Terracotta Army
Posts: 1789


Reply #7 on: April 08, 2011, 03:46:45 PM

Cheeseburger.

I'm very mysterious when I'm inside you.
Merusk
Terracotta Army
Posts: 27449

Badge Whore


Reply #8 on: April 08, 2011, 03:47:17 PM

Ok Barth. What's in that Cheeseburger, anyway?

The past cannot be changed. The future is yet within your power.
Morat20
Terracotta Army
Posts: 18529


Reply #9 on: April 08, 2011, 03:53:22 PM

It's 48 / 2 * 12 -- since multiplication and division are the same order you parse left to right, so it's 24 * 12. The tricky bit is, I suppose, realizing 2(9+13) is really 2* (9+3).

It's a badly written problem designed to fool people, though. (48/2) * (9+3) is more readable.
MahrinSkel
Terracotta Army
Posts: 10859

When she crossed over, she was just a ship. But when she came back... she was bullshit!


Reply #10 on: April 08, 2011, 04:27:14 PM

Which is why I trained myself to use extra parenthesis in my code so that there was no doubt at all about order, so that I didn't get weird parsing order bugs in my math.

--Dave

--Signature Unclear
Samprimary
Contributor
Posts: 4229


Reply #11 on: April 08, 2011, 04:35:24 PM

Cheeseburger.

I .. i think this works
Teleku
Terracotta Army
Posts: 10516

https://i.imgur.com/mcj5kz7.png


Reply #12 on: April 08, 2011, 04:53:44 PM

Arg, yeah.  Please Excuse My Dear Aunt Sally being drilled into my brain as a youth always makes me forgot that Multiplication and Division are equal, and so you go left to right in those cases.  I thought it was 2 as well.

"My great-grandfather did not travel across four thousand miles of the Atlantic Ocean to see this nation overrun by immigrants.  He did it because he killed a man back in Ireland. That's the rumor."
-Stephen Colbert
Morat20
Terracotta Army
Posts: 18529


Reply #13 on: April 08, 2011, 05:28:13 PM

Which is why I trained myself to use extra parenthesis in my code so that there was no doubt at all about order, so that I didn't get weird parsing order bugs in my math.

--Dave
lol. Me too. You should see my boolean expressions. Lots of white space and () so I can CLEARLY see what the fuck I'm doing. I hate guys with the mashed together shit, math or boolean, that depends on order and not readability.
ghost
The Dentist
Posts: 10619


Reply #14 on: April 08, 2011, 06:39:29 PM

You should do the stuff in parenthesis first, then take care of the rest.  So two would be correct using non-Excel math.
Ingmar
Terracotta Army
Posts: 19280

Auto Assault Affectionado


Reply #15 on: April 08, 2011, 06:48:49 PM

You should do the stuff in parenthesis first, then take care of the rest.  So two would be correct using non-Excel math.

No it wouldn't. The 2 is outside the parentheses. Once you do the stuff inside the parentheses, which you correctly say goes first, you are left with 48/2*12, and you do that from left to right.

EDIT: To end up with 2, you'd need it to look like this: 48 / (2(9+3)) or something similar.

Also... why are we even HAVING this conversation? [fry.gif aimed at samprimary]
« Last Edit: April 08, 2011, 06:50:29 PM by Ingmar »

The Transcendent One: AH... THE ROGUE CONSTRUCT.
Nordom: Sense of closure: imminent.
Sjofn
Terracotta Army
Posts: 8286

Truckasaurus Hands


Reply #16 on: April 08, 2011, 06:51:07 PM

He wanted to give people the opportunity to do some algebra. What other reason is needed?

God Save the Horn Players
MuffinMan
Terracotta Army
Posts: 1789


Reply #17 on: April 08, 2011, 06:53:57 PM

I've been patiently waiting all day for the next one but it better not be a goddamn story problem.

I'm very mysterious when I'm inside you.
Fordel
Terracotta Army
Posts: 8306


Reply #18 on: April 08, 2011, 07:02:54 PM

Arg, yeah.  Please Excuse My Dear Aunt Sally being drilled into my brain as a youth always makes me forgot that Multiplication and Division are equal, and so you go left to right in those cases.  I thought it was 2 as well.


I was Taught using "BODMAS":

Brackets and Exponents, Order of Appearance, Division, Multiplication, Addition, Subtraction.


I don't think it has a clever saying to go with it.

and the gate is like I TOO AM CAPABLE OF SPEECH
Morat20
Terracotta Army
Posts: 18529


Reply #19 on: April 08, 2011, 07:13:23 PM

He wanted to give people the opportunity to do some algebra. What other reason is needed?
That's not algebra. It's order of operations, something they teach in elementary school.

As I said, it's written trickily because the multiplicative operator isn't obvious, and honestly I feel it's bad practice not to use () when doing that sort of thing anyways.

Then again, I'm used to doing those problems as a / (b * (c+d)).

Jeff Kelly
Terracotta Army
Posts: 6921

I'm an apathetic, hedonistic, utilitarian, nihilistic existentialist.


Reply #20 on: April 08, 2011, 07:33:03 PM

Ambiguities like that are the reason that fractions are never notated like that in the real world anyway.
Strazos
Greetings from the Slave Coast
Posts: 15542

The World's Worst Game: Curry or Covid


Reply #21 on: April 08, 2011, 08:18:20 PM

PEMDAS, bitches.  awesome, for real

Fear the Backstab!
"Plato said the virtuous man is at all times ready for a grammar snake attack." - we are lesion
"Hell is other people." -Sartre
Morat20
Terracotta Army
Posts: 18529


Reply #22 on: April 08, 2011, 09:39:29 PM

PEMDAS, bitches.  awesome, for real
My father -- and this had to be back when I was 16 or 17 -- had to learn a lot of math very quickly. Company offered him a huge promotion, and while he'd had a solid grounding in math (up to trig, IIRC) he hadn't had to use much of it. What he did use (mostly trig, strangely) was mostly done through tables.

Anyways, he was moving from foreman -- oil refineries, he was in charge of a few major, multi-million dollar projects and got a good rep -- to basically some sort of complex safety thing. Pressurized vessel inspector or god knows what. It required him to do a lot of math for the calculations (he had to be able to do them, although even back then they had computers to run them) and part of the program that got him up to speed before he went through a year+ cert process involved a bunch of remedial math -- dusting off all that trig and algebra he hadn't had to use in forever.

So I recall him sitting at the table, running through some equations, and bitterly complaining that he kept running the numbers and they were wrong. He finally waves me and my brother over -- I was in Calculus and my brother was in Algebra II, I think -- to ask us. We look at his work, and the problem jumps out -- order of operations issue.  I don't recall the specifics, but I remember it taking me a few moments to reason out the correct order so it wasn't easy. (I think he'd screwed up an exponent somewhere).

My brother agrees, so we tell him "You're doing it in the wrong order. This first, then this, then this" and he asks "Why? How do you know?" so we explain the whole order of operations and finish with "And you can remember it with the mnemonic 'Please Excuse My Dear Aunt Sally'".

He responds "GODDAMN FUCKING BOB!". Turns out he'd asked an engineer at work, who looked at it and just said "Please Excuse My Dear Aunt Sally" and then walked off. He'd been banging his head on a handful of problems all day, off and on, when he'd been given the answer around nine that morning by a guy who hadn't bothered to follow up.
MahrinSkel
Terracotta Army
Posts: 10859

When she crossed over, she was just a ship. But when she came back... she was bullshit!


Reply #23 on: April 08, 2011, 09:48:04 PM

Which is why I trained myself to use extra parenthesis in my code so that there was no doubt at all about order, so that I didn't get weird parsing order bugs in my math.

--Dave
lol. Me too. You should see my boolean expressions. Lots of white space and () so I can CLEARLY see what the fuck I'm doing. I hate guys with the mashed together shit, math or boolean, that depends on order and not readability.
Yeah, and then some pedantic twit bitches about the redundancy and you have to prove that the compiler strips it all out, anyway.  Like we're still counting bytes or clock cycles, you silly twits.

--Dave

--Signature Unclear
Sjofn
Terracotta Army
Posts: 8286

Truckasaurus Hands


Reply #24 on: April 08, 2011, 09:55:38 PM

It's totally algebra! Order of operations is algebra! You might not have ALGEBRA 1 on the cover of your textbook when you learn it, but it's still algebra. :P

God Save the Horn Players
Chimpy
Terracotta Army
Posts: 10633


WWW
Reply #25 on: April 08, 2011, 10:19:06 PM

Son of a...I had totally forgotten about the whole left to right thing and how it matters when you have division and multiplication mixed. I kept thinking "division is just a form of multiplication, the answer will be the same" like addition/subtraction.

Now I think I know where I missed that one question on the civil service exam I took last week must have been.

'Reality' is the only word in the language that should always be used in quotes.
Nerf
Terracotta Army
Posts: 2421

The Presence of Your Vehicle Has Been Documented


Reply #26 on: April 08, 2011, 11:19:57 PM

God, I just finished reading 18 pages of this shit.

I hope that somewhere a math forum is arguing about guns.

http://www.ar15.com/forums/topic.html?b=1&f=5&t=1171079&page=1
ghost
The Dentist
Posts: 10619


Reply #27 on: April 09, 2011, 06:49:51 AM

apocrypha
Terracotta Army
Posts: 6711

Planes? Shit, I'm terrified to get in my car now!


Reply #28 on: April 09, 2011, 07:55:18 AM

Meh, I just think it's written wrong.

It should be (48÷2)(9+3) or 48÷(2(9+3)).

"Bourgeois society stands at the crossroads, either transition to socialism or regression into barbarism" - Rosa Luxemburg, 1915.
ghost
The Dentist
Posts: 10619


Reply #29 on: April 09, 2011, 09:18:45 AM

Meh, I just think it's written wrong.

It should be (48÷2)(9+3) or 48÷(2(9+3)).

Yeah.  This is probably the right answer.
proudft
Terracotta Army
Posts: 1228


Reply #30 on: April 09, 2011, 11:14:50 AM

Which is why I trained myself to use extra parenthesis in my code so that there was no doubt at all about order, so that I didn't get weird parsing order bugs in my math.

--Dave
lol. Me too. You should see my boolean expressions. Lots of white space and () so I can CLEARLY see what the fuck I'm doing. I hate guys with the mashed together shit, math or boolean, that depends on order and not readability.
Yeah, and then some pedantic twit bitches about the redundancy and you have to prove that the compiler strips it all out, anyway.  Like we're still counting bytes or clock cycles, you silly twits.

--Dave

The worst is when they do that crap as a job interview question.  My answer to "how does 1>>3*2+7*2<<4^2++ evaluate"  was always a heavy sigh and, 'I have no idea.  Use parentheses', but that never went over real well.  

I really became a parenthesis whore after some hours of headscratching over a bitshift that, somehow, had precedence over a comparison.  Or the other way around.  It was something completely bizarre and it's been so long and I have converted to the One True Path of Parentheses for long enough that I'm not 100% sure anymore what it was, but, you know what, I don't have to care about it anymore with the magic of parentheses.   Imagine that!
« Last Edit: April 09, 2011, 11:19:29 AM by proudft »
Samwise
Moderator
Posts: 19324

sentient yeast infection


WWW
Reply #31 on: April 09, 2011, 11:32:55 AM

The worst is when they do that crap as a job interview question.  My answer to "how does 1>>3*2+7*2<<4^2++ evaluate"  was always a heavy sigh and, 'I have no idea.  Use parentheses', but that never went over real well.  

The more complete answer would be "find out from the SCM system who wrote that line of code, then hit them with your keyboard until they fix it."

Quote
I really became a parenthesis whore after some hours of headscratching over a bitshift that, somehow, had precedence over a comparison.  Or the other way around.

I think the rule for relative precedence of bitwise and boolean operators is that it's whatever is least useful and most likely to cause bugs.
Morat20
Terracotta Army
Posts: 18529


Reply #32 on: April 09, 2011, 04:48:24 PM

I never use bitshifts. EVER. I dread getting asked questions about them because, well, I used them on a school assignment a few times and they've never come up in my professional life. Ever.

Well, maybe back in 2001. I *think* they might have come up then. Once. I frankly can barely recall what they do, much less evaulate them.
Samwise
Moderator
Posts: 19324

sentient yeast infection


WWW
Reply #33 on: April 09, 2011, 05:05:07 PM

You use bitwise operators a lot if you're writing code that needs to pack maximum information into minimum space -- e.g. if you have an object with ten different members that really only account for about twenty bits of information between them, and you're going to have a billion different instances of that object stashed away somewhere, you can save a lot of memory by cramming those ten things into a single 32-bit int rather than allocating a full int or even char for each one.
Morat20
Terracotta Army
Posts: 18529


Reply #34 on: April 09, 2011, 05:23:08 PM

I know what they're used for. I've just, with one exception, never had code running to the specs where it was necessary. I've had a few coders use it on projects, mostly to show off -- the fucking assholes. It just made their code a hell of a lot more unreadable for a non-existant performance gain. (The system wasn't stressed without them. Any improvement from using them was utterly lost in the noise).

The one exception was my first job out of college, and I was doing an interface end (some auto-generating code stuff. Fun, but didn't have the size and timing constraints the rest of it did) and some automated testing tools. The bitwise stuff came up in code reviews (only job I ever had those too), but only in a handful of people's stuff. THere was some low-down, ultra-fast, big shit where size and algorithmic complexity issues dominated and swapped back and forth.

Half the test tools I designed were built to test their code under projected conditions to see what needed to be optimized, either for memory size or speed.
Pages: [1] 2 Go Up Print 
f13.net  |  f13.net General Forums  |  General Discussion  |  Serious Business  |  Topic: 48÷2(9+3)  
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC