My Math Forum  

Go Back   My Math Forum > High School Math Forum > Elementary Math

Elementary Math Fractions, Percentages, Word Problems, Equations, Inequations, Factorization, Expansion


Reply
 
LinkBack Thread Tools Display Modes
July 26th, 2019, 07:03 AM   #1
Newbie
 
Joined: Jul 2019
From: Florida

Posts: 2
Thanks: 0

Negative exponent to a power

A practice test I'm using to study has a question that raises a fraction to a negative exponent which is also raise to a (positive) exponent. To me, the simple answer would be:


(1/4)^-4^2 = (4^-1)^16 but the book says the 16 is negative.

Any reason why this is? The book only gives what I've written above (with a -16 expoent) as the explanation so I'm a little bit in the dark.

I'll keep working on this and remove the post if I figure it out.
Questionairre is offline  
 
July 26th, 2019, 08:06 AM   #2
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: USA

Posts: 2,584
Thanks: 1430

your expression is

$\left(\left(\dfrac 1 4\right)^{-4}\right)^2$ ?

I would do this as

$\left(\left(\dfrac 1 4\right)^{-4}\right)^2 = \\

\left(\dfrac 1 4\right)^{-8} = \\

4^8 = \\

65536$
romsek is online now  
July 26th, 2019, 08:08 AM   #3
Senior Member
 
Joined: Jun 2019
From: USA

Posts: 309
Thanks: 160

Did they write the problem with carets the way you did?

It may be an ambiguity issue, as it is not clear whether they mean
$\displaystyle (1/4)^{((-4)^2)}=4^{-16}$ or $\displaystyle (1/4)^{(-(4^2))}=4^{16}$ or $\displaystyle ((1/4)^{-4})^2=4^{8}$.
I would normally agree with the first answer, but I know programming languages that would interpret it as one of the second two.
DarnItJimImAnEngineer is online now  
July 26th, 2019, 08:19 AM   #4
Senior Member
 
Joined: Aug 2012

Posts: 2,409
Thanks: 753

Exponentiation has higher precedence (or binds more tightly, in computer lingo) than addition/subtraction. So the expression $-4^2$ means: first do $4^2$, which is $16$, then apply the $-$ to get $-16$.

The fact that some (Which? I'm curious) programming languages get that wrong is irrelevant. The math rules are clear and unambiguous. I blame the math teachers of the world for failing to properly teach order of precedence. That's why these awful "This question broke the Internet" things go around that are nothing more than simple order of precedence problems.

FWIW I just put -4**2 into the interactive Python interpreter and got -16, the correct answer.

ps -- Perl also, correct evaluation.

Quote:
Originally Posted by Questionairre View Post
I'll keep working on this and remove the post if I figure it out.

Please leave it up, several billion people need to read it.

Last edited by Maschke; July 26th, 2019 at 08:27 AM.
Maschke is online now  
July 26th, 2019, 08:29 AM   #5
Senior Member
 
Joined: Jun 2019
From: USA

Posts: 309
Thanks: 160

Quote:
Originally Posted by Maschke View Post
The fact that some (which?) programming languages get that wrong is irrelevant. The math rules are clear and unambiguous.
I agree, but then how did the practise test get 4^16?

I just tried MATLAB and Excel, and they both gave me 65536.
DarnItJimImAnEngineer is online now  
July 26th, 2019, 08:41 AM   #6
Senior Member
 
Joined: Aug 2012

Posts: 2,409
Thanks: 753

Quote:
Originally Posted by DarnItJimImAnEngineer View Post
I agree, but then how did the practise test get 4^16?

I just tried MATLAB and Excel, and they both gave me 65536.
$(\frac{1}{4})^{-16} = \frac{1}{(\frac{1}{4})^{16}}= 4^{16} = 4294967296$. Your post has me confused. Excel and MATLAB are clearly completely wrong, if you entered this correctly.

Oh wait I see what they did. Exponentiation binds right to left, $a^{b^c}$ means $a^{(b^c)}$. That's why exponential towers (tetration) grow so quickly. MATLAB and Excel are clearly doing it the wrong way. They're computing $16^2$. That is wrong and there is no question about it.


I just tried it in C, but C has no exponentiation operator. It uses a pow() function in math.h, so you can't screw it up. If you write pow(-4,2) that's 16, and - pow(4,2) is -16. I hope I don't spend the rest of the day tracking down which languages get this wrong.

Last edited by Maschke; July 26th, 2019 at 09:02 AM.
Maschke is online now  
July 26th, 2019, 09:00 AM   #7
Senior Member
 
Joined: Jun 2019
From: USA

Posts: 309
Thanks: 160

Quote:
Originally Posted by Maschke View Post
Excel and MATLAB are clearly completely wrong, if you entered this correctly.
They both use left-to-right priority for order of operations with exponents, just like they do with multiplication/division and addition/subtraction.

I think I may have had a lysdexic attack or two somewhere in this post. Ultimately, though, I think the question is this:
Does order of operations consider $\displaystyle -4^2$ to be $\displaystyle 0-4^2=-16$ or "(negative four) squared equals 16?"
DarnItJimImAnEngineer is online now  
July 26th, 2019, 09:07 AM   #8
Senior Member
 
Joined: Aug 2012

Posts: 2,409
Thanks: 753

tl;dr: Wiki says that exponential towers always bind right to left, but iterated ^'s SOMETIMES bind left to right, and they mention Excel and MATLAB as two examples. I'll leave this as I originally wrote it.


Quote:
Originally Posted by DarnItJimImAnEngineer View Post
They both use left-to-right priority for order of operations with exponents, just like they do with multiplication/division and addition/subtraction.
That's completely wrong for exponentiation. It's not ambiguous or controversial. They're wrong. I imagine Excel screwed this up in 1980-something and for backward compatibility they realized they can never fix it. I don't know what MATLAB's excuse is, that program is used in a lot of scientific work, isn't it? $2^{3^4} = 2^{81}$ and there is simply no question about it.

Quote:
Originally Posted by DarnItJimImAnEngineer View Post
I think I may have had a lysdexic attack or two somewhere in this post. Ultimately, though, I think the question is this:
Does order of operations consider $\displaystyle -4^2$ to be $\displaystyle 0-4^2=-16$ or "(negative four) squared equals 16?"
Exponentiation binds more tightly than subtraction so $-4^2 = 0 - 4^2 = -16$ and there is no question about that either. If you want $(-4)^2 = 16$ you have to use the parens.

I hate to sound so dogmatic, but I'm stating the mathematical conventions.

Excel I don't mind, because it's used mostly for business. But MATLAB is a scientific tool. They have no excuse for getting this wrong.

I'm sounding pretty dogmatic even to myself. Am I missing something? Wolfram Alpha certainly gets it right.

https://www.wolframalpha.com/input/?i=(1%2F4)%5E-4%5E2

There are those who say this question is controversial or ambiguous. I do not believe that to be the case. The mathematical order of precedence is absolutely standard as I've stated it. I am genuinely shocked that MATLAB could possibly interpret an iterated exponential left to right. That's wrong. That would make tetration wrong. I'm not too surprised that Excel is wrong, it was designed as a business tool and now they're stuck with the wrong convention.


ps -- Mea culpa, mea culpa, mea maxima culpa. Here is what Wikipedia says. I think they're wrong but they're Wikipedia and I'm not.

If exponentiation is indicated by stacked symbols using superscript notation, the usual rule is to work from the top down ...

However, when using operator notation with a caret (^) or arrow (↑), there is no common standard.[13] For example, Microsoft Excel and computation programming language MATLAB evaluate a^b^c as $(a^b)^c$, but Google Search and Wolfram Alpha as $a^{(b^c)}$. Thus 4^3^2 is evaluated to 4,096 in the first case and to 262,144 in the second case.


I'm genuinely surprised. I have always regarded iterated ^'s as binding right to left. Frankly I still believe MATLAB and Excel are wrong and so is Wiki, but clearly the weight of authority is on the other side. Although Wolfram is THE authority. I truly believe MATLAB and Excel are wrong, but at least Wiki has noted the confusion.


pps -- Finally, here is that [13] reference. Someone went to the trouble to survey a whole bunch of programming languages on both the iterated ^ and the -4^2 issues, and what do you know, there really is a lot of inconsistency out there.

https://codeplea.com/exponentiation-...tivity-options

In math, the conventions are as I stated them. But there's much more variance among programming languages, database languages, and spreadsheets than I realized.

Last edited by Maschke; July 26th, 2019 at 10:01 AM.
Maschke is online now  
July 26th, 2019, 09:32 AM   #9
Newbie
 
Joined: Jul 2019
From: Florida

Posts: 2
Thanks: 0

OP

Wow, okay this blew up way more than I thought. Sorry for not using everyones username in this response to the entirety of the thread so far.

This was actually an algebra problem I'm doing on paper, not in a programming language.

To the poster mentioning the order of precedence, that took care of all of my issues.

To the one who mentioned the math teachers who have failed the youth, I agree. From what I remember in classes, most of the students would also lie and say they understand what the teacher had gone over because they just don't care to learn. It's a strange bilateral failure with neither side understanding what is really going on.

I'll leave the problem up in the forum for others to see and learn from as one poster mentioned.

Thank you all for you input and feel free to have what ever discourse you'd like related to the problem. This is your thread now.
Questionairre is offline  
July 26th, 2019, 10:47 AM   #10
Senior Member
 
Joined: Jun 2019
From: USA

Posts: 309
Thanks: 160

To be fair to MATLAB, I've been doing engineering calculations for a couple decades, and I don't think I've ever had to use nested exponents in real life -- except maybe with e as one of the bases, and then it uses the exp() function. And anytime I have expressions that complicated, I always add more parentheses than are strictly necessary just for human readability.

The negation point was one I had a real doubt about, though. I suppose I never think of negation as subtraction. But you're right; if WolframAlpha says negate after exponentiation, I'm inclined to trust them as mathematically superior to me.

"Also, you should really just use parentheses. If you don't, you're going to have a bad day sooner or later."
Dogma and principles aside, I think we can all agree with that one, no?
DarnItJimImAnEngineer is online now  
Reply

  My Math Forum > High School Math Forum > Elementary Math

Tags
exponent, negative, power



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Log with negative exponent on TI-84 Plus Calculator Angus Math Software 9 July 23rd, 2017 04:07 AM
Negative of an exponent Abhimanyu Elementary Math 4 October 4th, 2015 10:06 PM
How to get rid of a negative exponent on logs... Toyboy Algebra 4 July 30th, 2013 04:16 AM
Index or Power or Exponent Operations. prashantakerkar Algebra 13 November 16th, 2011 08:14 AM
Difference bewteen this with negative exponent rule? cytotoxictcell Algebra 1 November 1st, 2011 11:43 AM





Copyright © 2019 My Math Forum. All rights reserved.