I have a formula in excel
SUM((((25+273))/((40+273))*((688.00*1.001)+101.325))-101.325)-8.46
This formula gives me an answer of 642.36
I translated this formula to the following c# function
public decimal CalculateBaselinePressure(decimal baselineTemperature,
decimal knownTemperature,
decimal knownPressure)
{
return (baselineTemperature + 273) / (knownTemperature + 273) *
(((knownPressure * 1.001m) + 101.325m) - 101.325m) -8.46m;
}
This gives me an answer of 647.22378274760383386581469649M
Any idea why the formulas is not giving the same answer.