LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fractional powers of negative numbers

All righty then, got the formula node issue squared away, if you pardon the pun, but have run into another problem with it, essentially how to evaluate a fractional power of a negative number as in the following equation snippet:

 

(3.21004*(0.111667-B)**2.5)   where the subtraction results in a negative number? 

 

Thanks again,

 

 

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 1 of 4
(3,252 Views)

All right, if someone has an answer it would be cool to know, but for my application my customer just got back to me with the information that if the subtractions result in a negative number to be raised to the fractional power, then that term goes to zero. Kind of wish I had known that earlier, have other things to deal with in the program, particularly as I suspect that all these calculations will not truely be required in the long range, that the increased "accuracy" isn't required, but ...

 

Thanks!

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(3,240 Views)

LV_Pro wrote:

All righty then, got the formula node issue squared away, if you pardon the pun,


What issues with the formula node?

 


essentially how to evaluate a fractional power of a negative number as in the following equation snippet:

 

(3.21004*(0.111667-B)**2.5)   where the subtraction results in a negative number?


You could ask the same question by changing the 2.5 to 0.5. In this case it's a square root. So, you're trying to get the square root of a negative number. That brings you into the complex arena.

0 Kudos
Message 3 of 4
(3,237 Views)

Formula node: Different thread (right parenthesis).

 

x^2.5 = Sqrt(x^5).  For x < 0 this could be expressed as i*sqrt(abs(x)^5), where i = sqrt(-1).

 

Lynn 

0 Kudos
Message 4 of 4
(3,235 Views)