Decimal numbers in function not working

Copper Contributor

Hello all! 

 

I need help trying to create a function and solve for it. The function I am trying to create is taking:

=((D2/5)^1.534)

every time I try to solve for it I keep getting #NUM! error message. 

 

My function allows for me to use a whole number when taking it to a power, yet not a number with a decimal. 

 

The number that lives in D2 column is -0.166667. 

 

Thank you for your help in advance! 

 

 

4 Replies
Hi.

Maybe your decimal seperator is comma " , " instead of dot " . ".

@ANanfria 

It's not that it is the decimal power that's causing the problem, it's the negative value on the other side of the equation that is causing the error. It can be solved mathematically using imaginary numbers, however, this functionality is not available using Excel. 

If it is actually (-.166667^1.534) that you want to calculate, then you can use =IMPOWER(D2,1.534)

@ANanfria  wrote:  ``My function allows for me to use a whole number when taking it to a power, yet not a number with a decimal.``

 

Because when we raise a number to the power of a decimal fraction, we are effectively taking "a root" of the number; for example, 0.5 is the square root.  And usually we cannot take a root of a negative number.

 

I wonder if the following formula gives you the result that you intended:

 

=SIGN(D2)*(ABS(D2)/5)^1.534

 

Caveat:  That will certainly avoid the #NUM error and return a number.  But is it the correct number; or is it GIGO?

 

If you have doubts, I suggest that you provide the original mathematical equation that led you to want to calculate (D2/5)^1.534 in the first place.

 

Perhaps we can offer a different perspective on the mathematical solution(s).