News for hackers. Stuff that matters.
Re:Formerly good at math, but I've lost my skills. Any advic... by parfe on Friday April 08, 2011 @01:48PM (#2424878)
Grab a Calculus book and solve some random problems. It can get fairly entertaining. Solving how much rocket fuel you need to reach orbit or how fast a conical object will drain or the angle you need to fire a canon ball into a castle wall or something. I haven't found much use for Calculus though in regular life.

On a side note, we've been arguing about 48÷2(9+3) at the office today. There is a correct answer, of course, but also an argument (that some think is reasonable) against that answer.

Re:Formerly good at math, but I've lost my skills. Any advic... by parfe on Friday April 08, 2011 @02:16PM (#2425002)
48÷2(9+3) = 288

If anyone cares. We can poll it up.

Re:Formerly good at math, but I've lost my skills. Any advic... by nostrademons on Friday April 08, 2011 @02:55PM (#2425146)
Syntax error: expected operator but found '(' at line 1, column 5.
Re:Formerly good at math, but I've lost my skills. Any advic... by e03179 on Friday April 08, 2011 @02:04PM (#2424957)
48÷2(9+3) = 2
Re:Formerly good at math, but I've lost my skills. Any advic... by nlco on Friday April 08, 2011 @02:09PM (#2424977)
not quite, 48÷(2(9+3)) = 2, but 48÷2(9+3) = 288

to clarify: PEMDAS is the order of operations. so parenthesis first: 48÷2(9+3) = 48÷2(12) then multiplication and division (they have the same precedence): 48÷2(12) = 24*12 = 288

for another reference: http://www.google.com/search?q=48%C3%B72(9%2B3)

Re:Formerly good at math, but I've lost my skills. Any advic... by dcosson on Friday April 08, 2011 @02:18PM (#2425020)
multiplication and division have the same precedence, and division (like most operations) is left-associative. For example, exponentiation is right-associative, so 2^3^2 = 2^9 = 512, not 64.
Re:Formerly good at math, but I've lost my skills. Any advic... by wging on Friday April 08, 2011 @03:11PM (#2425208)
While you're technically correct, of the standard four half (+, *) are both left- and right-associative. / and - are the ones that are only left-associative.
Re:Formerly good at math, but I've lost my skills. Any advic... by sga on Friday April 08, 2011 @02:25PM (#2425045)
Best bet is to replace x÷y by x*(1/y) as division is not commutative while multiplication is commutative. Therefore 48÷2(9+3) => 48(1/(2(9+3)) => 2
Re:Formerly good at math, but I've lost my skills. Any advic... by wging on Friday April 08, 2011 @03:14PM (#2425218)
You've still failed to correctly apply associativity, unfortunately. You're treating 2(9+3) as a single unit, but ÷ appears before the implicit multiplication between 2 and (9+3) and so should get evaluated first. The division should get simplified first with its immediate operands, 48 and 2. This yields (48÷2) * (9+3).
Re:Formerly good at math, but I've lost my skills. Any advic... by nostrademons on Friday April 08, 2011 @09:02PM (#2426168)
It's funny, the top Google result for [juxtaposition precedence] is exactly this question, posted on the PhysicsForum boards. 2 is actually leading 288 by a hair there.

http://www.physicsforums.com/showthread.php?p=3235154

Anyway, the answer depends completely on whether you believe that multiplication by juxtaposition has the same precedence as multiplication by explicit symbol. There're good reasons to believe it doesn't, eg. the first post on that linked thread, but whatever the answer, it's entirely based on typographical convention. I don't work in the community that cares, so I don't really have an opinion, other than to point out it's not as cut-and-dried as virtually ever poster here believes.

In the community that I do work, people who write parsers, things like this have to be explicitly specified. That's why I maintain that the correct answer is "syntax error".

Re:Formerly good at math, but I've lost my skills. Any advic... by parfe on Friday April 08, 2011 @11:27PM (#2426424)
the real answer is that thw juxtaposition rules are made up on the spit by people trying to rationilze their incorrect answer . there is not and never had been a n "implit mulitplication" rule in the irder if operations.

sent frim my drunk phone

Re:Formerly good at math, but I've lost my skills. Any advic... by nostrademons on Friday April 08, 2011 @11:38PM (#2426440)
They did, however, cite sources (possibly made up almost on the spot), which is more than anyone on this thread has done.
Re:Formerly good at math, but I've lost my skills. Any advic... by ddlatham on Friday April 08, 2011 @04:09PM (#2425404)
48÷2(9+3) => 48(1/2)(9+3) => 288