Working with Exponents in c++

exponential function

I'm an automotive hobbyist and an intermediate coder. I seem to lack a fundamental understanding of the arithmetic when working with the exponent formula in excel or the math.exp() method in c++.

I have a vendor datasheet which describes a formula to resolve the resistance of a thermistor for any given temperature.

Trying to solve for x, the datasheet gives this: x = exp{A + B/T + C/T2 + D/T3}
where T is the temperature in Kelvin.
note the brackets as opposed to parenthesis.

The datasheet provides values for A, B, & C at various Kelvin ranges

For instance, at 283.15K (50 F), per the datasheet chart;
A is -16.2931
B is 6061.2476
C is -460567.9092
D is 30338541.7656

It doesn't look like a simple matter of (A + B/T + C/T2 + D/T3). Excel's EXP() formula rejects this as too big of a number, running it to a consol.output(result) in C++ calls it infinity. (The brackets {} must mean something other than what parenthesis mean, right?), but what?

How should x be resolved?
Thanks

edit: snapshot of datasheet
enter image description here

Best Answer

When I perform the numerical calculation with the proposed coefficients, the result is $2.024$ which is not at all out of range, so the formula may well be the correct one.

My guess would rather be a typo in your written code ?

Example C++ code

Related Question