Welcome to City-Data.com Forum!
U.S. CitiesCity-Data Forum Index
Go Back   City-Data Forum > General Forums > Science and Technology
 [Register]
Please register to participate in our discussions with 2 million other members - it's free and quick! Some forums can only be seen by registered members. After you create your account, you'll be able to customize options and access all our 15,000 new posts/day with fewer ads.
View detailed profile (Advanced) or search
site with Google Custom Search

Search Forums  (Advanced)
Reply Start New Thread
 
Old 08-12-2020, 03:16 PM
 
305 posts, read 294,968 times
Reputation: 244

Advertisements

Quote:
Originally Posted by ss20ts View Post
What's so complicated?

(5^2)-(-5^2)=
(25)-(25)=
0
(5^2)-(-5^2)=
(5^2)-(-[5^2])=
(25)-( - 25)=
50

What is so complicated?
Reply With Quote Quick reply to this message

 
Old 08-13-2020, 01:31 PM
 
Location: Vallejo
21,867 posts, read 25,154,836 times
Reputation: 19090
Quote:
Originally Posted by qazz12 View Post
(5^2)-(-5^2)=
(5^2)-(-[5^2])=
(25)-( - 25)=
50

What is so complicated?
It's not complicated. It's ambiguous.

-5^2 is either -(5^2) or (-5)^2. Depends if you treat -5 as an integer (-5) or as an operator -(5). Both are correct. It's basically two different equations depending on whether you interpret -5 as an integer or as an operator and integer.

Both answers are correct as written it can be interpreter either way. Normally you'd tell that by context.
x=-5^2 is 25 as -5 is just an integer.
x=n-5^2 is is n-25, the integer is 5 and the - is an operator. Those are clear from the context.
(-5^2) has no context. Both 25 and -25 are correct. It can be read either way.

There's no PEDMAS like agreement in how it is read. E.g.,
-2^2 is either 4 or -4 for the same reason. No context. If it's an integer then it's (-2)^2 which is 4. You'd first have to performing the exponent before distributing, so the proper way to distribute out the negative would be to raise it to the same exponent t -2^2 is the same as -1^2*2^2, 4.

if a=2, b=-3
a*b^2 is 2*-3^2.
square it first, b^2 is (-3)*(-3)*2 = 18.

2*-3^2 = 18.
b is an integer, -3, as stated in the problem. It isn't 2*-1*3^2, which is -18. B as stated is the integer -3. It is 2*-1^2*3^2, not 2*-1*3^2.

Last edited by Malloric; 08-13-2020 at 02:35 PM..
Reply With Quote Quick reply to this message
 
Old 08-13-2020, 02:31 PM
 
Location: Brackenwood
9,981 posts, read 5,684,706 times
Reputation: 22138
Quote:
Originally Posted by Malloric View Post
It's not complicated. It's ambiguous.

-5^2 is either -(5^2) or (-5)^2. Depends if you treat -5 as an integer (-5) or as an operator -(5). Both are correct. It's basically two different equations depending on whether you interpret -5 as an integer or as an operator and integer.

Both answers are correct as written it can be interpreter either way. Normally you'd tell that by context.
x=-5^2 is 25 as -5 is just an integer.
x=n-5^2 is is n-25, the integer is 5 and the - is an operator. Those are clear from the context.
(-5^2) has no context. Both 25 and -25 are correct. It can be read either way.

There's no PEDMAS like agreement in how it is read. E.g.,
Yes there is a PEDMAS-like agreement on how it's read: exponentiation takes precedence over negation. Period.

Whether you think it SHOULD be in that order is subject to debate. Whether programmers agree on that order is clearly up for debate. What's not up for debate is that, for the purposes of good ol'-fashioned written algebraic notation, there is a clear and accepted consensus among mathematicians: exponentiation takes precedence over negation. That's how it's taught in "intro to algebra" classes the world over. Any lack of consensus on this convention is not among mathematicians but among laypeople who don't remember what they were taught.

Quote:
Originally Posted by Malloric View Post
-2^2 is either 4 or -4 for the same reason. No context. If it's an integer then it's (-2)^2 which is 4. You'd first have to performing the exponent before distributing, so the proper way to do that would be that -2^2 is the same as -1*-1*2^2, which is 4.
The order of operations is all the context you need. Just as you could write 2+3*4 as 2+(3*4) for the sake of added clarity, you don't NEED the extra context to resolve "-2^2" even if it would be helpful for the sake of clarity, because the order of operations gives you all the context you need to arrive a consistent answer.

The answer to the original question is 50.
Reply With Quote Quick reply to this message
 
Old 08-13-2020, 03:29 PM
 
Location: Vallejo
21,867 posts, read 25,154,836 times
Reputation: 19090
Quote:
Originally Posted by Bitey View Post
Yes there is a PEDMAS-like agreement on how it's read: exponentiation takes precedence over negation. Period.

Whether you think it SHOULD be in that order is subject to debate. Whether programmers agree on that order is clearly up for debate. What's not up for debate is that, for the purposes of good ol'-fashioned written algebraic notation, there is a clear and accepted consensus among mathematicians: exponentiation takes precedence over negation. That's how it's taught in "intro to algebra" classes the world over. Any lack of consensus on this convention is not among mathematicians but among laypeople who don't remember what they were taught.


The order of operations is all the context you need. Just as you could write 2+3*4 as 2+(3*4) for the sake of added clarity, you don't NEED the extra context to resolve "-2^2" even if it would be helpful for the sake of clarity, because the order of operations gives you all the context you need to arrive a consistent answer.

The answer to the original question is 50.
-2^2 is 4 or -4. Just depends whether it's 2 squared change the sign or negative 2 squared. Order of operations does not tell you whether -2 is an integer or 2 "negationed" because order of operations does not include negation. It does include subtracton. 0-2^2 is -4. It does not, however, tell you that -2^2 is 0-2^2. That's outside of PEDMSA
x=2
f(x)=-x^2+5x-7 would be a basic algebra problem.
=-2^2+5*2-7.

Your context is provided by the equation. it's -(2)^2+5(2)-7, not (-2)^2. x is 2, not negative 2.
On the other hand if x=-2
--2^2+5*-2-7 you're dependent on context of the equation.

--2^2 take the square first is --4. PEDMSA doesn't really tell you what to do with --4 though. The old -4 is 0-4 deal would be 0--4, 4. But -(-2)^2 is not 4. You need the context of the equation. It's -(-2)^2, not --2^2. Which you know because of the context not because --2^2=-(-2)^2. --2^2 could be either 4 or -4.

Last edited by Malloric; 08-13-2020 at 04:18 PM..
Reply With Quote Quick reply to this message
 
Old 08-13-2020, 03:38 PM
 
11,230 posts, read 9,328,763 times
Reputation: 32257
Quote:
Originally Posted by Malloric View Post
-2^2 is 4 or -4. Just depends whether it's 2 squared change the sign or negative 2 squared. Order of operations does not tell you whether -2 is an integer or 2 "negationed" because order of operations does not include negation.
What on earth is that supposed to mean?


If we write -2^2 (in other words, if we're making up an internet "gotcha", not using the expression for some actual practical purpose), it means this:


-(2^2) because exponentiation comes before multiplication OR subtraction.


If you want to define -(2^2) as -1 * (2^2), or you want to define it as 0 - (2^2) is up to you, since by definition they're EXACTLY THE SAME FREAKING THING.


-2^2 = -(2^2) and only equals -4, not +4.
Reply With Quote Quick reply to this message
 
Old 08-13-2020, 03:58 PM
 
Location: Middle America
11,103 posts, read 7,164,275 times
Reputation: 17012
-5 is obviously negative, so there's no way to remove the negation, square the number, and then tack the negative value back on, as some are trying to do here. That breaks all rules of multiplication

(-5^2) = -5^2 = -5 x -5, but not -(5^2). The negative sign applies to the number, and can't be moved elsewhere.

Last edited by Thoreau424; 08-13-2020 at 04:07 PM..
Reply With Quote Quick reply to this message
 
Old 08-13-2020, 04:01 PM
 
11,230 posts, read 9,328,763 times
Reputation: 32257
Nope.
Reply With Quote Quick reply to this message
 
Old 08-13-2020, 04:03 PM
 
Location: Middle America
11,103 posts, read 7,164,275 times
Reputation: 17012
Quote:
Originally Posted by turf3 View Post
Nope.
You're probably the person who argues that the sky is green instead of blue, and the earth is flat...
Reply With Quote Quick reply to this message
 
Old 08-13-2020, 04:28 PM
 
11,230 posts, read 9,328,763 times
Reputation: 32257
No, I'm the person who uses mathematics every day of his working life. Exponentiation is ahead of either subtraction (if you prefer to think of a negative number as 0 - x) or multiplication (if you prefer to think of a negative number as -1 times x) - which of course are the same thing as you learned back in 5th or 6th grade when they taught you the identities.
Reply With Quote Quick reply to this message
 
Old 08-13-2020, 04:55 PM
 
Location: Vallejo
21,867 posts, read 25,154,836 times
Reputation: 19090
Quote:
Originally Posted by turf3 View Post
What on earth is that supposed to mean?


If we write -2^2 (in other words, if we're making up an internet "gotcha", not using the expression for some actual practical purpose), it means this:


-(2^2) because exponentiation comes before multiplication OR subtraction.


If you want to define -(2^2) as -1 * (2^2), or you want to define it as 0 - (2^2) is up to you, since by definition they're EXACTLY THE SAME FREAKING THING.


-2^2 = -(2^2) and only equals -4, not +4.
Or it means (-2)^2.

Is -2 the integer -2 or the operator minus the integer 2. The gotcha is in the equations.

PEMDAS

Parenthesis first, right.
Exponents first, wrong

(-5^2) is required to be performed first.
Is it negative 5 (-5) squared or is it minus 5 squared.... Depends if -5 means MINUS 5 or NEGATIVE 5.
Reply With Quote Quick reply to this message
Please register to post and access all features of our very popular forum. It is free and quick. Over $68,000 in prizes has already been given out to active posters on our forum. Additional giveaways are planned.

Detailed information about all U.S. cities, counties, and zip codes on our site: City-data.com.


Reply
Please update this thread with any new information or opinions. This open thread is still read by thousands of people, so we encourage all additional points of view.

Quick Reply
Message:


Over $104,000 in prizes was already given out to active posters on our forum and additional giveaways are planned!

Go Back   City-Data Forum > General Forums > Science and Technology

All times are GMT -6. The time now is 08:09 PM.

© 2005-2024, Advameg, Inc. · Please obey Forum Rules · Terms of Use and Privacy Policy · Bug Bounty

City-Data.com - Contact Us - Archive 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37 - Top