Other Pineapple Smurf
Honorary Master
There is no such rule.
Parentheses denote grouping and the signed real number in front of the parentheses is part of that group. That is the rule
South Africa’s biggest forum. Discuss, discover, and connect with thousands of members.
There is no such rule.
you're not really good at basic maths for a programmer
![]()
function 2(A) { return 2*A; }
print 2(9+3)
24
print 48/2(9+3)
2
Note how 16 ÷ 2[8 – 6] is reduced to 16 ÷ 4. That is because the 2 is part of the brackets. If we did it your way, then 16 ÷ 2 would be evaluated first.
Note that different software will process this differently; even different models of Texas Instruments graphing calculators will process this differently. In cases of ambiguity, be very careful of your parentheses, and make your meaning clear. The general consensus among math people is that "multiplication by juxtaposition" (that is, multiplying by just putting things next to each other, rather than using the "×" sign) indicates that the juxtaposed values must be multiplied together before processing other operations. But not all software is programmed this way, and sometimes teachers view things differently. If in doubt, ask!
(And please do not send me an e-mail either asking for or else proffering a definitive verdict on this issue. As far as I know, there is no such final verdict. And telling me to do this your way will not solve the issue!)
Thank you for my badge, kind sirHate to say it, but you might actually have a point. The author of the page you referred to however says:
So this is a recognized area of uncertainty and as such, you are not completely right. The general consensus (with which I will now agree), however support your point of view.
Well Done!![]()
Scary to note that most of you guys got it wrong (considering that many of you are in the IT industry) and this is really basic maths.
I get..who gives a ****
Actually....Google doesn't fking lie!
me thinks the problem is with too much syntax freedom..
these listed below all mean the same thing:
2(9+3) = 2.(9+3) = 2x(9+3) = 2*(9+3)
it's only when the "48/" gets introduced in front where it suddenly becomes a difference.
Was actually planning on drinking a beer & watching House...damn threads keep interfering with the plan though.Why the **** are we doing maths on a Friday night? o.0
Why the **** are we doing maths on a Friday night? o.0