Two Plus Two Older Archives

Two Plus Two Older Archives (http://archives2.twoplustwo.com/index.php)
-   Science, Math, and Philosophy (http://archives2.twoplustwo.com/forumdisplay.php?f=45)
-   -   Simple math/syntax problem (http://archives2.twoplustwo.com/showthread.php?t=390177)

maurile 12-02-2005 07:56 PM

Simple math/syntax problem
 
This caused a 35-page argument on another forum. Let's see how quickly a consensus is arrived at here.

-5² = ???

purnell 12-02-2005 08:35 PM

Re: Simple math/syntax problem
 
[img]/images/graemlins/confused.gif[/img]

what's to argue about?

(-5)^2 = 25

- (5^2) = -25

30 pages? I must have no idea what I'm talking about if there is an argument.

maurile 12-02-2005 08:42 PM

Re: Simple math/syntax problem
 
[ QUOTE ]
what's to argue about?

(-5)^2 = 25

- (5^2) = -25

[/ QUOTE ]
Everybody agrees that (-5)^2 = 25 and -(5^2) = -25.

The question is which of those two possibilities -5^2 represents.

Without any parentheses, what's the correct order of operations? Do you square the five and then make the result negative? Or do you make the five negative and then square it?

It's really a syntax problem rather than a math problem, but some people say it's ambiguous, some people say it's unambiguously 25, and some say it's unambiguously -25.

There does appear to be a correct answer according to what is apparently the standard convention.

purnell 12-02-2005 08:51 PM

Re: Simple math/syntax problem
 
[ QUOTE ]
Without any parentheses, what's the correct order of operations?

[/ QUOTE ]

I don't know. There must be a convention, but since I don't know what it is, I have to rely on the parentheses. Is there some organization in charge of this?

maurile 12-02-2005 08:59 PM

Re: Simple math/syntax problem
 
[ QUOTE ]
Is there some organization in charge of this?

[/ QUOTE ]
I don't think there's an official organization, but all the highschool math teachers and highschool math textbooks that we've encountered so far have given the same response.

Their response was the opposite, however, of the one given by the huge majority of engineers we've sampled.

Also, Google calcluator and MS Excel give one answer while TI-85 gives the opposite answer.

So it appears to be ambiguous.

All of the math teachers, however, say that it's not ambiguous, that it clearly has an unambiguous answer according to the accepted convention for the order of operations. They are sure about this, and I'm inclined to believe them over the engineers who said "I'm not sure, but if I had to guess I'd pick this one" (and got the opposite answer from the one the teachers gave).

I don't want to give the correct (as judged by the teachers who say they're sure) answer away yet. Let's see if anybody in here feels strongly one way or the other.

I can argue either side (although I side with the teachers).

TomCollins 12-02-2005 09:13 PM

Re: Simple math/syntax problem
 
[ QUOTE ]
This caused a 35-page argument on another forum. Let's see how quickly a consensus is arrived at here.

-5² = ???

[/ QUOTE ]

Technically, I believe it's -25. Power goes before sign/subtractingg.

jason_t 12-02-2005 10:15 PM

Re: Simple math/syntax problem
 
-5^2 = -5 * 5 = -25.

This is the correct order of operations.

imported_luckyme 12-02-2005 10:37 PM

Re: Simple math/syntax problem
 
0 - 5^2 = Y
0 = Y + 5^2
-Y = 5^2
-Y = 25
Y = -25

how badly did I screw up?

Siegmund 12-03-2005 12:22 AM

Re: Simple math/syntax problem
 
Doesn't speak well for the other forum that they found something to argue about. -25.

Perhaps the easiest way to convince someone of it to look at more complicated expressions like x^2+x+3 and -x^2+x+3, plug x=5 and x=-5 into these, and see the difference in how they get evaluated.

AlphaWice 12-03-2005 12:53 AM

Re: Simple math/syntax problem
 
BEDMAS .. look it up on google.

I wonder : if people cannot sort out simple math disputes on SMP, how will they be able to sort out complicated disputes about God?

Piers 12-03-2005 02:01 AM

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.

garyjacosta 12-03-2005 05:12 AM

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

maurile 12-03-2005 06:56 AM

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.

maurile 12-03-2005 06:59 AM

Re: Simple math/syntax problem
 
Here is the thread on the other forum: link.

punter11235 12-03-2005 10:16 AM

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.

punter11235 12-03-2005 10:18 AM

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.

jason_t 12-03-2005 03:22 PM

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).

man 12-03-2005 04:50 PM

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?


All times are GMT -4. The time now is 09:42 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.