Math functions

Knowing that fan power varies with cube of air-flow, and by measuring fan current (proportional to power), I want to derive a quantity proportional to air-flow. This requires finding the cube-root of measured current. I have tried

10 VAR2 = VAR1 ^ 0.333

and also

10 VAR3 = 1 / 3
20 VAR2 = VAR1 ^ VAR3

and also

10 VAR2 = SQR ( SQR ( VAR1 ^ 1.333) ) (which = VAR ^1/3)

None of these produces the correct result: the answer returned is VAR1 ^ 1.

The exponent appears to be limited to positive integers (1 and above).
Is this correct? Or is there some other syntax I should be using

T3000 math doesn’t support fractional exponents.A practical workaround is to approximate the cube-root with a small polynomial
You can replace your line with the following:

10 VAR11 = VAR1 * VAR1
20 VAR12 = VAR11 * VAR1
30 VAR2  = 0.98 + 0.23 * VAR1 - 0.018 * VAR11 + 0.00047 * VAR12

Thank you.

Is there a reason why you don’t use :

10 VAR11 = VAR1 ^2
20 VAR12 = VAR1 ^ 3
30 VAR2 …

Is multiplication more processor-efficient than exponent?

Your VAR1 ^ 2 and VAR1 ^ 3 lines work fine. Using multiplication instead is just a safer and more predictable way to express the same calculation. There’s no real performance difference, so either form is OK.

Sorry to be a nuisance, but would you please provide the derivation of your polynomial? I dont follow the various terms.

The polynomial was obtained by fitting the function X ^ (1/3) using a standard least-squares cubic fit.
The routine finds the coefficients of:

a+bx+cx^2+dx^3

that best approximate the cube-root over the operating current range.
This process produced:

0.98+0.23x−0.018x^2+0.00047x^3