I want to use log() function (natural logarithm) in one of my calculation of Temperature using the Stein Hart Equation. Microcontroller used is STM32L476 .
#define getTempKelvin(R) (1/(THERM_A + (THERM_B*log(R)) + (THERM_C*log(R)*log(R)*log(R)))) TempKelvin = (float)getTempKelvin(ThermResistance);
This is how I calculate the temperature where ThermResistance is the Resistance of the Thermistor that is measured. The problem is that, I'm getting 0 as value in variable TempKelvin ,I have included math.h library and checked CIMSIS DSP in Run Time Environment of Keil. How to solve this issue? I'm able to open math.h in keil and C is the language used but shows log is undefined, when tried to go to the definition.