Calculation using ^ (to the power of) in a Meta Data Point
-
Hi peeps, I am struggling to create a meta data point with a (^) to the power of in its formula.
The formula being used in excel is = (610.7*10^((7.5x23)/(237.3+23))/1000)
which returns = 2.8 (Correct answer)The ^ means 'To the power of'
The 23 is my TempAfter some attempts to get the calculation working using Math.pow I decided to try a simple formula Math.pow(2, Temp) and it returns NAN where if I use 23 Instead of Temp it returns 8388608. So I'm guessing its the Math.pow conflicting with external data points (Temp)
Could someone please help get a valid calculation working in script that returns the 2.8 I'm trying to achieve ;-)
Kind Regards and thanks in advance.
-
@steve-o said in Calculation using ^ (to the power of) in a Meta Data Point:
(610.7*10^((7.5x23)/(237.3+23))/1000)
Steve, what is your temp variable? Is it the name of your variable? Then you should use this:
(610.7*Math.pow(10,((7.5*temp.value))/(237.3+23))/1000)
Following works as it should on math pow
(610.7*Math.pow(10,((7.5*23))/(237.3+23))/1000) // returns 2.808825816730143
-
This post is deleted! -
@thomaseinasto Thanks Thomas , I made a silly mistake in the Calc, Its working as expected now. Cheers mate