#11
|
|||
|
|||
Re: Simple math/syntax problem
[ QUOTE ]
Everybody agrees that (-5)^2 = 25 and -(5^2) = -25. The question is which of those two possibilities -5^2 represents. [/ QUOTE ] If – is defined to have prority then 25 is correct, if ^ is defined to have proirty then –25 is correct. Hope that answered your question. |
#12
|
|||
|
|||
Re: Simple math/syntax problem
X is understood as (1) x (X)
A (-) before X applies to the lead coefficient (1) Therefore: When X=5 -(1) x^2 = -25 |
#13
|
|||
|
|||
Re: Simple math/syntax problem
Well, you guys are no fun.
Even though Google and Excel return an answer of 25, that's contrary to standard convention. By convention, exponentiation has priority over multiplication, and the unary minus is considered to be a multiplicative operator (converting the operand to its opposite by multiplying by negative one). Many people read -5^2 as taking negative five and squaring it. But in fact there is no negative five in that expression. The thing that's negative is five squared, not five. The squaring comes first, then the negativing. (Yes, I am making up words.) It's funny how adamant some people are, however, that -5^2 - 25, and that there's no other legitimate way of doing it. |
#15
|
|||
|
|||
Re: Simple math/syntax problem
[ QUOTE ]
how badly did I screw up? [/ QUOTE ] Dont forget that "-5" is not the same as "0 - 5". First minus is a symbol which change expression's sign and second minus is a symbol for operation of substracting. These two can have diffrent priorities. |
#16
|
|||
|
|||
Re: Simple math/syntax problem
[ QUOTE ]
-5^2 = -5 * 5 = -25. This is the correct order of operations. [/ QUOTE ] [img]/images/graemlins/confused.gif[/img] -5^2 is either -(5^2) or (-5)^2 depending on priorities of "-" where "-" is symbol which change expression's sign not substracting. |
#17
|
|||
|
|||
Re: Simple math/syntax problem
[ QUOTE ]
[ QUOTE ] -5^2 = -5 * 5 = -25. This is the correct order of operations. [/ QUOTE ] [img]/images/graemlins/confused.gif[/img] -5^2 is either -(5^2) or (-5)^2 depending on priorities of "-" where "-" is symbol which change expression's sign not substracting. [/ QUOTE ] Yes I should have used a set of parentheses. By what I typed I meant -(5 * 5). |
#18
|
|||
|
|||
Re: Simple math/syntax problem
[ QUOTE ]
Even though Google and Excel return an answer of 25, that's contrary to standard convention. [/ QUOTE ] it might be because most users of Excel aren't careful enough, so the programmers made it this way. but what about -6^2? |
|
|