Hi there,

I'm working on ADuC7060 microconverter board to develop the firmware for our ongoing product development. In that I need to use pow() and ln() math library function to execute the firmware. However, if I use those library functions, the results were not correct (or wrong)...

I used those functions as given below in my code;

temp_const2 = pow(Constant3, temp_const1);

Temperature2 = (double)(IDEALITY_FACTOR*BOLTZMAN_CONSTANT*log10(temp_const2/Constant4));

Please let know if anything I missed to get the accurate result for the given library functions.

Thank you,

Karthick

The math functions are provided by the compiler vendor.

You don't provide enough information to be able to help.

I tested the functions and they work fine for me.

#include <math.h>

double test = 7.3;

double result = 0;

result = pow(test, 3.0); //result is 389.017 same as calculator

result = log10(test); //result is 0.863322... same as calculator.