Header file math.h is for mathematical functions like cos,sin, tan.. But how to write the ln function and not log?
3 Answers
Remember math at school: logA_B = logA_C/logB_C
double ln(double x) { return log(x); }
Or in a pinch
#define ln(x) log(x)