This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F2800137: log() and logf() shows different calculation result

Part Number: TMS320F2800137
Other Parts Discussed in Thread: TIDM-02010

Tool/software:

Hi Champs,

When I run the log with fpu as below

(1.0f / ((1.0f / 298.15f) + (1.0f / 4133.0f) * logf((8250.0f * ((4095.0f / adc_val) - 1.0f)) / 47000.0f))) - 273.15f

with adc_val = 563, then it shows completely wrong value.

but when I run with math.h

(1.0f / ((1.0f / 298.15f) + (1.0f / 4133.0f) * log((8250.0f * ((4095.0f / adc_val) - 1.0f)) / 47000.0f))) - 273.15f

it shows right value. what can make the calculation wrong?

Regards,

Ted