Hello, I am curve fitting a thermal couple using Excel.

This Excel calculation for “=14.782578+0.099628456*P31^1.4634484” calculates the correct answer of 29.95008781 of 31 degrees F.

Where” P31” = 31 or the variable in the code below called "Outside".

The form of the equation is Y = A + B X^C from TableCurve (curve fitting software).

I programmed this into Arduino and the results of 21.77 are wrong.

Please check out a copy of my code below:

double A = 14.782578; double B = .09962846; double C = 1.4364484; Outside = A + B * Outside * sqrt(C);

Thanks, Lou