how to take log in c++ code example
Example 1: log base c++
int intlog(double base, double x) {
return (int)(log(x) / log(base));
}
Example 2: log base e synthax c++
#include <math.h> /* log */
double param, result;
param = 10;
result = log (param);
printf ("log(%f) = %f\n", param, result );
Example 3: log in c++
#include <cmath>
log(number)