PDA

View Full Version : Math question



Tinaa
2008-Sep-20, 02:11 AM
I need some help with exponents.

Why does

-22 = -4

AND

-(2)2 = 4

Seems backwards to me but that is what the text book says.

Some one please explain this to me!

ABR.
2008-Sep-20, 02:33 AM
I need some help with exponents.

Why does

-22 = -4

AND

-(2)2 = 4

Seems backwards to me but that is what the text book says.

Some one please explain this to me!

Both of these should yield the same answer: -4. Did you mean for the second expression to read (-2)2=4? Otherwise, the book is incorrect.

Tinaa
2008-Sep-20, 02:38 AM
Both of these should yield the same answer: -4. Did you mean for the second expression to read (-2)2=4? Otherwise, the book is incorrect.



Yes, that is what I meant. So, explain to me why

-22 doesn't = -2 * -2 = 4

negative times a negative is a positive.

ABR.
2008-Sep-20, 02:51 AM
Yes, that is what I meant. So, explain to me why

-22 doesn't = -2 * -2 = 4

negative times a negative is a positive.

-22 can be expressed as (-1)*2*2=-4. There is only one (-1) so the answer has to also be negative. If the original expression were (-2)2 then you could also express it as (-2)*(-2)=4. The exponent only works on the (-) if it the (-) is also within the parentheses.

My wife the math teacher just mentioned that another way to look at -22 is that it is the opposite of 22

Tinaa
2008-Sep-20, 03:01 AM
I suppose that could make sense. I could see the implied -1 if it was written as -(22).

Van Rijn
2008-Sep-20, 03:03 AM
Another way to look at it is order of precedence of symbols. Exponentiation has higher precedence than negation, so for -2^2, first you square, then you negate. However, parentheses have higher precedence than exponentiation, so if there are parentheses, you first evaluate the expression in the parentheses, then you square.

One tricky point is that in some applications and computer languages, the order of evaluation can vary somewhat. So in some cases throwing in -2^2 will return a 4.

Tinaa
2008-Sep-20, 03:05 AM
Another way to look at it is order of precedence of symbols. Exponentiation has higher precedence than negation, so for -2^2, first you square, then you negate. However, parenthesis have higher precedence than exponentiation, so if there are parentheses, you first evaluate the expression in the parenthesis, then you square.

One tricky point is that in some applications and computer languages, the order of evaluation can vary somewhat. So in some cases throwing in -2^2 will return a 4.

Okay, that makes sense. Itis more of an order of operations thing.

01101001
2008-Sep-20, 03:08 AM
Yes, that is what I meant. So, explain to me why

-22 doesn't = -2 * -2 = 4

negative times a negative is a positive.

Common rules of arithmetic define the precedence of operations: what happens before what when parentheses aren't present to make it obvious. Those rules typically make exponentiation happen before negation.

Wikipedia: Order of operations (http://en.wikipedia.org/wiki/Order_of_operations):


The order in which the unary operator − (usually read "minus") acts is often problematical. In written or printed mathematics, − 32 = − (32) = − 9 [...]

(I can't give you all the levels. I'm a computer programmer and I've learned so many sets of precedence rules for various languages, that I don't trust myself to know precedence rules any more, even for common arithmetic. I always add the explicit parentheses so nothing is left to semi-arbitrary convention.)

Tinaa
2008-Sep-20, 03:11 AM
Yeah I've been using PEMDAS for order of operations. I don't remember negation. Where would it fall? At the end with subtraction?

Van Rijn
2008-Sep-20, 04:03 AM
Like 01101001, I look at this more from a computer programming point of view, which isn't quite the same as a conventional mathematical point of view. But, I think for your purposes you can do what ABR suggested and swap the unary negation operator with "(-1)*" in expressions, and evaluate precedence accordingly. So, for example, -4 + 3 becomes (-1)*4+3

Grey
2008-Sep-20, 05:06 AM
For myself, whenever I'm writing an expression like that, I always include the parentheses, whether my audience is a person or a compiler. That way, I can be sure that I'm getting my point across unambiguously, without the reader trying to second guess what I meant, or needing to wonder whether I remember the right order of operations, or anything like that.

redshifter
2008-Sep-20, 06:01 AM
This is why I majored in History...:)

geonuc
2008-Sep-20, 09:11 AM
In my calculations, I always use parentheses to make it clear. I deal with a lot of negative values.

tdvance
2008-Sep-20, 01:36 PM
it's order of operations.

The typical way is:

parenthesis first, of course,

exponentiation,

unary minus (negation),

multiplication, division,

addition, subtraction.

so -2^2 is interpreted as - (2^2) or -4 since the prefix "-" binds less tightly than the postfix ^2 (but more tightly than multiplication, not that it matters, since (-x)*y is the same as -(x*y), but I went by the usual ordering in programming languages above).

Now...there is ambiguity here: 2^3^4 -- is that 2048, or is it a number with 24 digits?

Some programming languages go left-to-right with exponentiation, giving (2^3)^4=2048,

others (and I like this better), right-to-left giving 2^(3^4)=2^81, having 81*log_10(2)=81*log(2)/log(10) = 81*log_10(1000)/log_2(1000) approx 81*log_10(1000)/log_2(1024) = 81*3/10 approx 24 digits.

Jeff Root
2008-Sep-20, 05:15 PM
I get 25 digits for 281: 2,417,851,639,229,258,349,412,352.

And I get -22 = 4.

-- Jeff, in Minneapolis

hhEb09'1
2008-Sep-20, 07:23 PM
I get 25 digits for 281: 2,417,851,639,229,258,349,412,352.

And I get -22 = 4.Did you do that, or a calculator? Which one?

dhd40
2008-Sep-20, 08:14 PM
it's order of operations.

The typical way is:

parenthesis first, of course,

exponentiation,

unary minus (negation),

multiplication, division,

addition, subtraction.

so -2^2 is interpreted as - (2^2) or -4 since the prefix "-" binds less tightly than the postfix ^2 (but more tightly than multiplication, not that it matters, since (-x)*y is the same as -(x*y), but I went by the usual ordering in programming languages above).

Now...there is ambiguity here: 2^3^4 -- is that 2048, or is it a number with 24 digits?

Some programming languages go left-to-right with exponentiation, giving (2^3)^4=2048,

others (and I like this better), right-to-left giving 2^(3^4)=2^81, having 81*log_10(2)=81*log(2)/log(10) = 81*log_10(1000)/log_2(1000) approx 81*log_10(1000)/log_2(1024) = 81*3/10 approx 24 digits.

If you write it the "normal" way: 234 then there´s no confusion at all: It´s 281

dhd40
2008-Sep-20, 08:22 PM
(snip)
And I get -22 = 4.

-- Jeff, in Minneapolis

That´s true if you use Excel this way: A1=-2, B1 = A1*A1
But then A1 = (-2) !
If you take -22 "literally", you have to calculate (in Excel) A1=2, B1 =-A1*A1, or even better, B1=-(A1*A1)

mugaliens
2008-Sep-20, 09:38 PM
I need some help with exponents.

Why does

-22 = -4

AND

-(2)2 = 4

Seems backwards to me but that is what the text book says.

Some one please explain this to me!

In the first one, you're squaring a 2, which results in a 4, then multiplying it by a -1, to reach a -4:

-22 = -1 * 22 = -1 * 4 = -4

In the second, you're squaring a 2, which is 4, then multiplying it by a -1:

-(2)2 = -1 * (2)2 = -1 * 4 = -4

Both you and the textbook are half right!

To reach a +4, you would need to put the minus sign inside the parentheses, like so:

(-2)2 = (-1 * 2)2 = (-1)2 * (2)2 = 1 * 4 = 4

tdvance
2008-Sep-20, 09:39 PM
Did you do that, or a calculator? Which one?

I didn't do what JR did since I was too lazy to turn around to the computer with Mathematica, gp, maple, magma, matlab, sage, etc. on it and get the answer and retype here :) but now that I'm on my home computer I'd be able to cut-and-paste from mathematica if necessary.

I guess modern calculators (haven't had one since grad school) might have that many digits, but the ones I used went up to from 8 to 12 digits or so.

the 25 vs. 24 of course just means I forgot to count the "1" in 1 with 24 zeros.

Jeff Root
2008-Sep-20, 09:39 PM
I get 25 digits for 281: 2,417,851,639,229,258,349,412,352.

And I get -22 = 4.
Did you do that, or a calculator? Which one?
I did about 0.1% of the work and the calculator did 99.9%.

I used the calculator that I figured 99.9% of the people posting in
this thread have (how many people are posting in this thread??):
Windows calculator. I input "-2" then clicked the "x^2" button.

-- Jeff, in Minneapolis

mugaliens
2008-Sep-20, 09:40 PM
Yes, that is what I meant. So, explain to me why

-22 doesn't = -2 * -2 = 4

negative times a negative is a positive.

Because:

-22 = -1 * 22 = -1 * 4 = -4

mugaliens
2008-Sep-20, 09:41 PM
In my calculations, I always use parentheses to make it clear. I deal with a lot of negative values.

Parenthetically, I deal with a lot of negative people.

:lol:

hhEb09'1
2008-Sep-21, 12:25 AM
I used the calculator that I figured 99.9% of the people posting in
this thread have (how many people are posting in this thread??):
Windows calculator. I input "-2" then clicked the "x^2" button.You forgot to hit the equals sign to finish it! :)

And, when I typed 2^3^4 into the Windows calculator, I got 4096, after I hit the equals sign.

Van Rijn
2008-Sep-21, 12:41 AM
Now, if you try "-2^2" in Google calculator, it returns this:

-(2^2) = -4

and "(-2)^2" returns

(-2)^2 = 4

Jeff Root
2008-Sep-21, 02:11 AM
I used the calculator that I figured 99.9% of the people posting in
this thread have (how many people are posting in this thread??):
Windows calculator. I input "-2" then clicked the "x^2" button.
You forgot to hit the equals sign to finish it! :)
Maybe I don't get it, but I didn't hit the equals sign because there
is no need to. Hitting it at that point does nothing.

-- Jeff, in Minneapolis

pzkpfw
2008-Sep-21, 02:31 AM
Don't forget when to use the the [+/-] "button" [basically short for x * (-1)].

[2], [x^2], [+/-] --> -4. [ -1 x 22 ]

[2], [+/-], [x^2] --> 4. [ (-2)2 ]

(The number on screen is the "x" in [x^2], so the whole (-2) is squared).

hhEb09'1
2008-Sep-21, 01:50 PM
Maybe I don't get it, but I didn't hit the

equals sign because there
is no need to. Hitting it at that point does nothing.Weird, it does for me.

OK, when I type (minus)(two)(square)(equals) I get -4

But when I type (two)(+/-)(square)(equals) I get 4, but that's reversing the order of the first two.

However, when I type (+/-)(two)(equals) I get 2, so the (+/-) key doesn't work in front of the (two) at the start of the sequence. The sequence (minus)(two)(plus)(three)(equals) does result in the answer 1.

Jeff Root
2008-Sep-21, 03:23 PM
Unpronounceable Strangely-Colored Old Grapejuice Stain,

I of course used the "+/-" key after typing the "2" because the calculator
does not allow me to change the sign of a number that doesn't exist yet.

Since the calculator explicitly separates the operations of negation and
subtraction, it removes that ambiguity while entering values. But the
ambiguity is still there when writing out what was entered, unless one
explicitly distinguishes between the two keys.

The BIG problem with that calculator is how TINY the minus sign is!
They should have used a font that contains an N dash. Or the font
should have an N dash, or a longer hyphen!

-- Jeff, in Minneapolis

hhEb09'1
2008-Sep-21, 10:36 PM
Unpronounceable Strangely-Colored Old Grapejuice StainI got the joke the first time! :)

I of course used the "+/-" key after typing the "2" because the calculator
does not allow me to change the sign of a number that doesn't exist yet.

Since the calculator explicitly separates the operations of negation and
subtraction, it removes that ambiguity while entering values. But the
ambiguity is still there when writing out what was entered, unless one
explicitly distinguishes between the two keys.If you aren't going to follow what was written down, you should have typed (two)(square)(-/+)[equals], since that follows the algebraic precendence of operators.


The BIG problem with that calculator is how TINY the minus sign is!
They should have used a font that contains an N dash. Or the font
should have an N dash, or a longer hyphen!True! I'm always almost mistaking it for the decimal point, but of course I never do.

HenrikOlsen
2008-Sep-21, 11:28 PM
From what little I remember about typography, when you have a font with separate minus and n-dashes, the minus is smaller than the n-dash, which is smaller than the m-dash which is smaller that the dash-form of the ellipsis.

pzkpfw
2008-Sep-22, 12:25 AM
Weird, it does for me.

OK, when I type (minus)(two)(square)(equals) I get -4


That minus means subtract from x (what's on screen). When you start, there's a 0 there, so this is equivalent to:

[0], [-], [2], [x^2], [=] --> [0], [-], 4, [=] --> -4

Calc is correctly applying the square to the 2 on screen, then subtracting it from the 0.

If you don't hit [=] you will still see the 4 from squaring the 2.

(
You could try this instead:

[0], [-], [2], [=], [x^2] --> -2, [x^2] --> 4
)


But when I type (two)(+/-)(square)(equals) I get 4, but that's reversing the order of the first two.

Using the [+/-] key is different to hitting [-] in front of something. It's not reversing the order of the above.



However, when I type (+/-)(two)(equals) I get 2, so the (+/-) key doesn't work in front of the (two) at the start of the sequence.

0 is neither positive nor negative, so hitting [+/-] before you enter any number won't do anything (to the 0 on screen).

It "doesn't work" - by design.



The sequence (minus)(two)(plus)(three)(equals) does result in the answer 1.

That's:

0 - 2 + 3 --> -2 + 3 --> 1

Not (in one step):

-2 + 3 --> 1

You'd need to enter:

[2], [+/-], [+], [3], [=] to (be pedantic and) calculate -2 + 3.


(
I may be beating a dead horse, but it seemed there were some discrepancies on whether people were using [-] or [+/-] to "negate" a number.
[-] means subtract. You can subtract from 0 to reverse the sign of a number.
[+/-] means reverse the sign of the current number (x).
These are subtly different.
)

hhEb09'1
2008-Sep-22, 01:11 AM
Apparently, you beat someone else's horse to death, it don't belong to me or Jeff :)

The question was whether the microsoft calculator correctly evaluates -22 as -4, and it appears that it does, as near as it can.



the 25 vs. 24 of course just means I forgot to count the "1" in 1 with 24 zeros.When I first read this, I thought "Why '1' and not '2"?" since the answer starts with a 2, followed by 24 more digits. Then, while perusing this amazing thread, I found this:

Now...there is ambiguity here: 2^3^4 -- is that 2048, or is it a number with 24 digits?td, somehow, your calculator is dividing all your answers by two! :)

Jeff Root
2008-Sep-22, 01:35 AM
I failed to say anything about this in my last post:



I didn't hit the equals sign because there is no need to.
Hitting it at that point does nothing.
Weird, it does for me.
I just installed Windows 98 SE on this old notebook in the last few
days. The calc.exe however is from Windows Me, which I used to
have on a different computer. I thought that calculator was better
than the Windows 95 calc.exe, so I saved it. Shortly before this
thread started I replaced the calc.exe installed by Windows 98 SE
with the Millenium version. I didn't look at the 98 SE version closely
to see how it differs from the Millenium version, but the file sizes
are different so I just replaced it.

I typed [2] [+/-] [x^2]. The result was "4". Hitting the [=] key
any number of times after that does nothing.

Doing that unambiguously finds the square of negative two, and
avoids anything to do with either subtraction or precedence.




Unpronounceable Strangely-Colored Old Grapejuice Stain
I got the joke the first time! :)
But it is still unpronounceable. I'm just starting to put a little bit
of pressure on you to change to something I can memorize. I'm
not going to memorize the string of characters you currently use,
and some change in the BAUT software several months ago makes
it harder to copy nicknames from the post headers, so the only
easy way to input your nickname is to quote the post, and I don't
always want to do that.

Get creative.

You can keep the stain. Though I still don't know why grapejuice
makes a red stain instead of purple.



If you aren't going to follow what was written down, you should have
typed (two)(square)(-/+)[equals], since that follows the algebraic
precendence of operators.
But that gives an incorrect result. And why would you need to hit
the [=] key?

-- Jeff, in Minneapolis

Jeff Root
2008-Sep-22, 01:44 AM
td, somehow, your calculator is dividing all your answers by two! :)
Ooops! He mistakenly used his tax calculator!

-- Jeff, in Minneapolis

tdvance
2008-Sep-22, 02:17 AM
Apparently, you beat someone else's horse to death, it don't belong to me or Jeff :)

The question was whether the microsoft calculator correctly evaluates -22 as -4, and it appears that it does, as near as it can.

When I first read this, I thought "Why '1' and not '2"?" since the answer starts with a 2, followed by 24 more digits. Then, while perusing this amazing thread, I found this:td, somehow, your calculator is dividing all your answers by two! :)

no, my head was. I thought, 2^12, that's 1024 times 2 or 2048, when I should have thought, 1024 times 2^2 or 4096.

hhEb09'1
2008-Sep-22, 04:26 AM
But it is still unpronounceable.According to my kids, so is "root" :)

But it's not necessary to pronounce the words on BAUT. Typing them should be sufficient.
I'm just starting to put a little bit
of pressure on you to change to something I can memorize. I'm
not going to memorize the string of characters you currently use,
and some change in the BAUT software several months ago makes
it harder to copy nicknames from the post headers, so the only
easy way to input your nickname is to quote the post, and I don't
always want to do that.

Get creative.Sorry, there has been a change in BAUT attitudes towards that, and I can no longer change my nick. We're both stuck with it.


You can keep the stain. Though I still don't know why grapejuice
makes a red stain instead of purple.It's not kool-aid! :)

But that gives an incorrect result. We were evaluating this:

And I get -22 = 4.That's an incorrect result, according to the usual operator precedence.

Tobin Dax
2008-Sep-22, 02:23 PM
Because:

-22 = -1 * 22 = -1 * 4 = -4
If it's still worth anything, Mugs has it right. I've been thinking that since about 1/3 the way down the first page.

Jeff Root
2008-Sep-22, 04:24 PM
-22 = -1 * 22 = -1 * 4 = -4
If it's still worth anything, Mugs has it right.
I disagree. If you take it as a given -- in some particular context --
that the correct answer is -4, then the correct analysis must be:
-22 = 0 - 22 = -4

You are subtracting four from zero, not multiplying by negative one.

If -22 means "The square of negative two" then the correct result is 4.

If -22 means "Subtract the square of two" then I must ask what you
are subtracting from, or what contextual cue tells you that you are
subtracting rather than finding the square of a negative number.

-- Jeff, in Minneapolis

tdvance
2008-Sep-22, 05:13 PM
Negation is a unary operator, you need not subtract from anything. -2[sup]2 is -(2[sup]2) = -(4) = -4, since superscripts bind tighter than negation.

hhEb09'1
2008-Sep-22, 05:16 PM
I disagree. If you take it as a given -- in some particular context --The context is the usual order of operator precedence. But, as this wiki page (http://en.wikipedia.org/wiki/Order_of_operations#The_standard_order_of_operatio ns) says and I just verified, microsoft excel does not follow that order of precedence.

Jeff Root
2008-Sep-22, 05:23 PM
But it is still unpronounceable.
According to my kids, so is "root" :)
That's what happens when you raise your kids in Nepal.



But it's not necessary to pronounce the words on BAUT. Typing them
should be sufficient.
Pronouncing a word is an aid to memorizing its spelling. Your nickname
is unpronounceable, thus unmemorable, thus untypeable.



Sorry, there has been a change in BAUT attitudes towards that, and I
can no longer change my nick. We're both stuck with it.
Where there's a will, there's a way. Where there's a need, there's a
cliché.




You can keep the stain. Though I still don't know why grapejuice
makes a red stain instead of purple.
It's not kool-aid! :)
It looks like Rustoleum from a spray can.




And I get -22 = 4.
That's an incorrect result, according to the usual operator precedence.
There is no subtraction in what I typed, so there can be no operator
precedence ambiguity. The result is correct.

-- Jeff, in Minneapolis

Jeff Root
2008-Sep-22, 05:36 PM
Replace "x" with a value in this equation:

x2 = y

If I replace "x" with "2" I get 22 = 4

If I replace "x" with "-2" I get -22 = 4

Again, I was not faced with any question of order of precedence.

-- Jeff, in Minneapolis

tdvance
2008-Sep-22, 05:39 PM
If you replace x with -2, you get (-2)^2 = 4.

tdvance
2008-Sep-22, 05:40 PM
In other words, substitution in mathematics is NOT textual substitution. If it were, a lot of math problems would suddenly get much easier....

hhEb09'1
2008-Sep-22, 05:40 PM
There is no subtraction in what I typed, so there can be no operator
precedence ambiguity. The result is correct.So, what does the expression

-tan(pi/4)

evaluate to, in your opinion?

tdvance
2008-Sep-22, 06:00 PM
Never programmed in a functional language, eh?

hhEb09'1
2008-Sep-22, 06:01 PM
Never programmed in a functional language, eh?moi?
Replace "x" with a value in this equation:

x2 = y

If I replace "x" with "2" I get 22 = 4

If I replace "x" with "-2" I get -22 = 4What happens when you replace "x" with "5 - 2"? :)

NEOWatcher
2008-Sep-22, 06:09 PM
This whole thread seems parallel to a study in the news today.

Study: Kids Misplaced In Algebra (http://www.woio.com/Global/story.asp?S=9049851)



Private researchers are reporting that more kids than ever are taking algebra in eighth grade but not necessarily learning more math.

tdvance
2008-Sep-22, 06:10 PM
moi?What happens when you replace "x" with "5 - 2"? :)



I meant JR--saying that "tan" isn't a value!

tdvance
2008-Sep-22, 06:11 PM
oh--he must have deleted the post.

hhEb09'1
2008-Sep-23, 09:06 AM
Where there's a will, there's a way. It turns out, that I do eventually change my nick (http://www.bautforum.com/astronomy/62578-5th-annual-astronomy-challenge-announcement.html#post1044042), to Win Megamillions, but that's after Phil and Fraser sell BAUT to Bill Gates for 2 billion dollars. They spend most of it on continuing their youth maintenance regimen.

When I showed a couple high school math teachers yesterday that microsoft excel computes -2^2 = 4, there were audible gasps. :)

I'd imagine that the current convention came about because they* didn't want a difference between 0 - 2^2 and 0 + -2^2


* the powers that be, not microsoft. Wait...

Pippin
2008-Sep-24, 06:28 PM
Long story short, your textbook was poorly written. A mathematician or computer programmer would easily understand what they meant, but someone learning exponentials for the first time should not be expected to do implied Order of Operations.
-(2^2)=-4 and (-2)^2=4 is much easier to understand and should have been used for the example.
Mathematicians write lousy textbooks, and English Professors make even worse proofreaders/editors for those textbooks. Catch 22!

tdvance
2008-Sep-24, 06:37 PM
gee, when I was in High School, order of operations was actually *taught* to us. We were expected to sort it out. And we did.

Pippin
2008-Sep-24, 07:08 PM
gee, when I was in High School, order of operations was actually *taught* to us. We were expected to sort it out. And we did.

I heartily agree, it's the "implied" order of operations in this example that is wrong. -2 is defined as negative 2 to the student. It's not defined with the implied (-)=(-1) . The new student is taught () and +,-,/,* . With no parenthesis and no operation symbol evident they shouldn't be expected to change -2^2 in their heads or on paper to be (-1)*2^2. Given the second equation they should absolutely know order of operations and do the exponential first and then multiply by negative one, even though the (-1) is at the beginning of the equation and come up with -4. Given only -2^2 they should come up with 4.

tdvance
2008-Sep-24, 07:58 PM
I was taught that -2^2 was -(2^2)=-4.

Tinaa
2008-Sep-25, 12:48 AM
I wonder how I passed, pretty decent grades too, several college classes that had lots of math. Everything from college algebra to astronomy to strength of materials. I've tutored several people through college and high school algebra and all passed with A's or B's. Why didn't I know this? Looking back, I should have.

Weird.

hhEb09'1
2008-Sep-25, 01:34 AM
Given only -2^2 they should come up with 4.What should they get if they were given only --2^2? :)

Pippin
2008-Sep-25, 02:02 AM
What should they get if they were given only --2^2? :)

They should get a large brick to throw at the professor.

Seriously though, mathematical syntax should be used to remove ambiguities not add to them. We start off teaching children 6X6 = 36, but then they get to Algebra and we say "no more X, thats a variable now!" and switch to 6*6 = 36.
Then we even do away with that and it becomes 6x=y instead of 6*x = y. Then we wonder why kids gripe about how hard math is!! I got my degree in math so I obviously was able to "follow the bouncing ball" so to speak.
The equation syntax should be as well understood as the verbal syntax
ie.: negative two to the power of two is equal to four, but minus two to the power of two is equal to negative four.

hhEb09'1
2008-Sep-25, 02:11 AM
Seriously though, mathematical syntax should be used to remove ambiguities not add to them.That's exactly what operator precedence does. So, what should they get if they were given only --2^2?
I got my degree in math so I obviously was able to "follow the bouncing ball" so to speak.Was there a money back guarantee? :)

The equation syntax should be as well understood as the verbal syntax
ie.: negative two to the power of two is equal to four, but minus two to the power of two is equal to negative four.It is as well understood, for some, who understand the precedence. Notice, both of those can be written the same way, -2^2

I take it that you would pronounce "--2^2" as "minus negative two to the power of two" then?

Pippin
2008-Sep-25, 05:18 AM
No I would suggest that whoever typed --2^2 drink less coffee. While I appreciate humor I am seeming to miss the humor in your replies. Do we have to keep this up?
Gee what if they wrote --....--2^2 what would be the answer?
The original question involved a textbook, my opinion was that it was poorly edited. I suggested clearer means of conveying the questions while still teaching the subject matter.
Feel free to disagree but troll someone else's post please.

hhEb09'1
2008-Sep-25, 07:25 AM
No I would suggest that whoever typed --2^2 drink less coffee. I typed that, but I hadn't drank any coffee. It was just a question about operator precedence, which is what the OP was about.
The original question involved a textbook, my opinion was that it was poorly edited. I suggested clearer means of conveying the questions while still teaching the subject matter.That's why I asked the question, twice. I'm not convinced that your approach, which disagrees with the usual operator precedence that is taught, is a clearer means. Prossibly, the examples of the OP were there to illustrate that operator precedence. Sometimes, mathematical deductions hinge on fine distinctions.

Feel free to disagree but troll someone else's post please.I am not trolling. It was a serious question.

pzkpfw
2008-Sep-25, 09:38 AM
Well, I'll have a go.

To me, --22 provides context for itself.

While 2--2 = 4, there'd seem to be no point writing leading minuses, as in --22.

So I'd "intuitively" treat it as -(-2)2 = -4

i.e. I'd think the second "-" is for the 2, giving (-2)2, which is then negated by the first "-".

[
But then again, on what I'd have thought were grounds of (lack of) context, I'd have treated (written, not input on a calculator) -22 as (-2)2 ... and from what I've read in this thread I'm happy to admit I would have been wrong.
]

In which case I'd guess the strictly correct answer is: --22 ~ -(-(22)) = 4



(Silly answer: --22 = 3 [kind of related to the complaint that "*" is used for multiplication]).

Tinaa
2008-Sep-25, 11:00 AM
What should they get if they were given only --2^2? :)

4

-1 * -1 * 2^2
1 * 4 = 4

geonuc
2008-Sep-25, 11:19 AM
Was there a money back guarantee? :)
Use of a smiley does not make this comment acceptable.

hhEb09'1
2008-Sep-25, 01:23 PM
I'm serious, as I said, so I'd take back the smiley if I had to. Having a degree in math does not justify advocating a non-mainstream point of view, but it is Off-Topic Babbling so it's not that big of a deal.

Like I said, even microsoft excel has -2^2 = 4. I was trying to show how this can lead to ambiguities, and situations where it's not so clear, even to those who advocate the opposite point of view. Of course, in excel, --2^2 is 4, but so is ---2^2. I don't think you can dismiss the concantenations by saying I just had too much coffee.

Worse, in my mind, in excel, -(2)^2 = 4

There, there is no concatenation, and clearly, the outside minus sign is not there to indicate a negative two. I think that's the trouble that was resolved long ago, in arriving at the current system.

Pippin
2008-Sep-25, 03:41 PM
I'm sorry for the snappy reply hhEb09'1 if it was a serious question.
My response is still the same in essence. There is no consistency in the math syntax being taught to students, from my above comments, therefore I felt it was a poor example used in the text book, even if it was properly edited.
(-1)*2^2 = -4 teaches order of operation and still teaches the exponential.
It is a difference between operators and indicators to me. The student should be focused on the math at hand and not a question of syntax. Otherwise they would have to continually raise their hands in class and ask, "Professor does the - indicate an operation or is indicating the fixed quantity of (-2)?"
0-2^2= (-4). The context was in a textbook which suggests a classroom, and the somewhat simple equation suggests a not-so advanced mathematics class. Therefore I stick to my guns on this, confusing the student with syntax is inappropriate. Either the question was poorly written by a mathematician in a matter not clear to the audience, or it was edited poorly by someone not familiar with the math. Either way the student suffers, which is why the question ended up here, because there was confusion!

Disinfo Agent
2008-Sep-25, 03:48 PM
There is no consistency in the math syntax being taught to students, from my above comments, therefore I felt it was a poor example used in the text book, even if it was properly edited.
(-1)*2^2 = -4 teaches order of operation and still teaches the exponential.
It is a difference between operators and indicators to me. The student should be focused on the math at hand and not a question of syntax.But syntax exists precisely so that we may focus on the math, without having to quibble over the order of the operations!

tdvance
2008-Sep-25, 03:58 PM
Well, I'll have a go.

To me, --22 provides context for itself.

While 2--2 = 4, there'd seem to be no point writing leading minuses, as in --22.

So I'd "intuitively" treat it as -(-2)2 = -4

i.e. I'd think the second "-" is for the 2, giving (-2)2, which is then negated by the first "-".

[
But then again, on what I'd have thought were grounds of (lack of) context, I'd have treated (written, not input on a calculator) -22 as (-2)2 ... and from what I've read in this thread I'm happy to admit I would have been wrong.
]

In which case I'd guess the strictly correct answer is: --22 ~ -(-(22)) = 4



(Silly answer: --22 = 3 [kind of related to the complaint that "*" is used for multiplication]).

If you wrote 0 --2^2, I'd agree the first minus is a "minus, the second a unary "negation". You would get 4.

If you wrote --2^2, both would be unary negation operators. Prefix unary operators, by convention, are evaluated right to left (innermost first), so this is:

-(-(2^2)) = 4

No ambiguity.

Pippin
2008-Sep-25, 03:58 PM
Every child's classroom that I have seen has a number chart, when the concept of negative numbers is introduced the number chart on the wall is reflected with the inclusion of those numbers 20 19...1 0 -1 -2....-20
The difference between and excel worksheet and a calculator is the +/- key on a calculator. Excel relies on parenthesis for indicating negative numbers however a calculator would not. -2^2 would be inputed : 2 then +/- key to swap it to negative and then x^2 key to get the square.
I'm not arguing the semantic differences, I am arguing the value of teaching the mathematics. The number charts on a classroom wall do not have (-1) (-2) etc, they simply have -1 -2 ..... Therefore a student should expect the value of -2=(-2).

tdvance
2008-Sep-25, 04:01 PM
I'm serious, as I said, so I'd take back the smiley if I had to. Having a degree in math does not justify advocating a non-mainstream point of view, but it is Off-Topic Babbling so it's not that big of a deal.

Like I said, even microsoft excel has -2^2 = 4. I was trying to show how this can lead to ambiguities, and situations where it's not so clear, even to those who advocate the opposite point of view. Of course, in excel, --2^2 is 4, but so is ---2^2. I don't think you can dismiss the concantenations by saying I just had too much coffee.

Worse, in my mind, in excel, -(2)^2 = 4

There, there is no concatenation, and clearly, the outside minus sign is not there to indicate a negative two. I think that's the trouble that was resolved long ago, in arriving at the current system.


Also, there is more than one kind of "degree in math". I've seen high school math teachers, who technically have a "degree in math" who get flummuxed on basic algebra.

My HS geometry teacher said he showed this problem to a HS math teacher in another county, and the latter was stumped:

solve for x: 2^(2x) - 3*2^x + 2 = 0. Degree in math, indeed!

Disinfo Agent
2008-Sep-25, 04:02 PM
The difference between and excel worksheet and a calculator is the +/- key on a calculator. Excel relies on parenthesis for indicating negative numbers however a calculator would not. -2^2 would be inputed : 2 then +/- key to swap it to negative and then x^2 key to get the square.It depends on the calculator. In mine, I must write (-2) and then press 2, if I want to get 4 as the output.

HenrikOlsen
2008-Sep-25, 04:13 PM
solve for x: 2^(2x) - 3*2^x + 2 = 0. Degree in math, indeed!
rewrite as (2^x)^2-3*2^x+2=0,
introduce a helper y=2^x and rewrite as y^2-3*y+2=0,
solve simple quadratic(or guess) to get solutions y=1 and y=2,
pull out helper to get 1=2^x or 2=2^x,
solve to get solutions x=0 and x=1
Doesn't take a degree in math.

And I like the --2^2 = 3 solution, since any other interpretation means it's likely either a typo or intentional obfuscation:)

Pippin
2008-Sep-25, 05:21 PM
Also, there is more than one kind of "degree in math". I've seen high school math teachers, who technically have a "degree in math" who get flummuxed on basic algebra.

My HS geometry teacher said he showed this problem to a HS math teacher in another county, and the latter was stumped:

solve for x: 2^(2x) - 3*2^x + 2 = 0. Degree in math, indeed!

My ** was in the applied mathematics track, the teaching track indeed was less rigorous in advanced mathematics. That's not a discredit to a math teacher who may not be able to calculate the elliptical orbit of a binary star system but, is able to reach a group of school children and explain math in terms they can grasp. If you like trick questions and semantical arguments that's great , but a teaching tool such as a text book should reflect the current knowledge of the student at hand.
Example: 1 + 1 + 1 = 3 yes? no ? always?
Scientifically that's not always true: 0.6 + 0.6 + 0.6 = 2.4
rounding off the value of 0.6 before placing it into an equation yields 1
Do you explain that to a 5 year old? no you don't. But you make sure an engineering student knows it!

Jeff Root
2008-Sep-25, 06:03 PM
I agree with everything Pippin said, except maybe about the coffee and
0.6 + 0.6 + 0.6 = 2.4. I think he hit "6" instead of "8". Caffeine seems not
to affect me, so I don't use it.

-- Jeff, in Minneapolis

mforest
2008-Sep-25, 07:08 PM
solve to get solutions x=0 and x=1

x=2*pi*i*n/ln2 and x=1+2*pi*i*n/ln2 for any integer n


And I like the --2^2 = 3 solution, since any other interpretation means it's likely either a typo or intentional obfuscation:)

Is this a programming language reference?

hhEb09'1
2008-Sep-25, 07:48 PM
I agree with everything Pippen said, except maybe about the coffee and
0.6 + 0.6 + 0.6 = 2.4. I think he hit "6" instead of "8". I think he's rounding .6 up to 1, and 2.4 down to 2.
If you like trick questions and semantical arguments that's great , but a teaching tool such as a text book should reflect the current knowledge of the student at hand.That's my position.

Example: 1 + 1 + 1 = 3 yes? no ? always?
Scientifically that's not always true: 0.6 + 0.6 + 0.6 = 2.4
rounding off the value of 0.6 before placing it into an equation yields 1Scientifically, you'd add the sum before rounding to a single significant digit. All four terms of 0.6 + 0.6 + 0.6 = 2. have one significant figure.

pzkpfw
2008-Sep-25, 08:03 PM
Scientifically that's not always true: 0.6 + 0.6 + 0.6 = 2.4
rounding off the value of 0.6 before placing it into an equation yields 1
Do you explain that to a 5 year old? no you don't. But you make sure an engineering student knows it!

I once built a system to produce National statistics (on a subject I won't identify as it's too unique).

Rows for region, columns for month of the year, and a final column for percent of the National total that each region total was.

Back when they built these tables by typewriter, they'd have people ringing to complain if the percentages (generally to 2 or 3 d.p.) didn't add up to 100%, because, well, they had to.

So they would pick the highest % and just add 0.01 or something to it!

When I built an Excel based automated system to do it, the first thing they did was check the percentage totals - and demanded I make it do the same fiddling.

I explained that this made the region percentage inaccurate, etc, and after a Month finally got it through by printing "percentages are rounded to 3 decimal places" at the bottom of every table.



Is this a programming language reference?

In essence, in some languages, --x is like x = x - 1 (assign the value of x minus 1, back to x)

Jeff Root
2008-Sep-25, 08:04 PM
I agree with everything Pippen said, except maybe about the coffee
and 0.6 + 0.6 + 0.6 = 2.4. I think he hit "6" instead of "8".
I think he's rounding .6 up to 1, and 2.4 down to 2.
That can't be it, but you probably have the right general idea:
0.6 + 0.6 + 0.6 = 1.8, which rounds up to 2, while 0.6 rounds up
to 1, so 1 + 1 + 1 = 3. In that case Pippin's error was likely an
editing error in which he neglected to change "2.4" to "1.8".

-- Jeff, in Minneapolis

hhEb09'1
2008-Sep-25, 08:25 PM
That can't be it, but you probably have the right general idea:
0.6 + 0.6 + 0.6 = 1.8, which rounds up to 2, while 0.6 rounds up
to 1, so 1 + 1 + 1 = 3. JOOC, did you mean "1 + 1 + 1 = 2"?

I understand, though, how that might be hard to write. :)

Pippin
2008-Sep-25, 08:28 PM
Ok busted on that one, I was typing quickly on my way out the door. But you all did get my point. So it's all good in the end.