Exponants calculations

Gman

Registered User.
Local time
Today, 15:45
Joined
Oct 17, 2008
Messages
39
I need to use an exponant in a query, it works fine as long the exponant is a whole number

I receive an #error in the feild with the expression below.

DoorInfiltrationCFM: [DoorPressure]^(0.5)

How can I use a decimal number as exponant.

Thanks
 
Works for me, but you might have Nulls so you would need to use the NZ function. Also, what is [DoorPressure]? Is it numeric?
 
Yes,

I used

DoorInfiltrationCFM: [DoorPressure]^0.5
DoorInfiltrationCFM: [DoorPressure]^(0.5)
DoorInfiltrationCFM: [DoorPressure]^.5
DoorInfiltrationCFM: [DoorPressure]^(1/2)

All get the error,
 
Doorpressure can be anynumber,

But typcailly it -.02 to .02
 
Yes,

I used

DoorInfiltrationCFM: [DoorPressure]^0.5
DoorInfiltrationCFM: [DoorPressure]^(0.5)
DoorInfiltrationCFM: [DoorPressure]^.5
DoorInfiltrationCFM: [DoorPressure]^(1/2)

All get the error,

Check for any nulls in any of your [DoorPressure] Records. You might need to use

DoorInfiltrationCFM: Nz([DoorPressure],0)^0.5
 
I think that it is the the negative number that is the problem,
 
It was, I used the abs([doorpressure])^0.5

Thanks for the help
 
I am not sure what a [doorpressure] is, but as long as there are instances where negative values are appropriate and the ABS() is an acceptable response, then you seem to have a solution.

AFTERTHOUGHT: Since your solution requires you to first multiply by -1 when the value is less than 0 (ABS()), won't you need to multiply it by -1 again to get the proper answer?
 
Last edited:
(-x)^(0.5) is asking for the square root of a negative number. These do not exist in the real number system. (Access does not natively support complex numbers)

The square root of any real number has either none or two answers. If it is negative there is no answer. In the positve case there are both the negative and positive forms of the same value. The negative answer is generally ignored.
 
are you always looking for a square root (ie power of 0.5)

if so there is an explicit sqr function

still needs a positive argument though

-------
having said this, this must be a standard calc in your industry - so the answer must be obvious.
 
(-x)^(0.5) is asking for the square root of a negative number. These do not exist in the real number system. (Access does not natively support complex numbers)

The square root of any real number has either none or two answers. If it is negative there is no answer. In the positve case there are both the negative and positive forms of the same value. The negative answer is generally ignored.

Unless, of course, there are scientific or mathematical reasons to accept an Imaginary Number as a solution to the problem. In that case, Multiplying by (-1) will give the answer, as long as it is displayedwith the Imaginary Number indicator ("i")
 

Users who are viewing this thread

Back
Top Bottom