I’ve converted the following expression

to this function
private double getRisingTemp(double x/*time*/)
{
double y;
y = Math.Pow(3 * 10, -12) * Math.Pow(x, 5) - Math.Pow(4 * 10, -9) * Math.Pow(x, 4) + Math.Pow(10, -6) * Math.Pow(x, 3) + 0.0005 * Math.Pow(x, 2) - 0.0302 * x + 23.826;
return y;
}
But the graph in C# looks a bit different from the one I see in Excel. Just want to make sure my C# function 100% corresponds to equation.

If function is fine, what might be wrong?

Your expressions for the x^4 and x^5 coefficients are incorrect. Just use the built in
doublewith scientific notation: