int intlog(double base, double x) {
return (int)(log(x) / log(base));
}
[Mathematics] log10x = log10(x) [In C++ Programming]
[Mathematics] log2x = log2(x) [In C++ Programming]
#include <math.h> /* log */
double param, result;
param = 10;
result = log (param);
printf ("log(%f) = %f
", param, result );
double log10(double x)
Code Example |
---|
Cpp :: get value of enum cpp |
Cpp :: c++ reference |
Cpp :: c++ load file as vector |
Cpp :: array max and minimum element c++ |
Cpp :: check if char in string c++ |
Cpp :: sort 0 1 2 leetcode |
Cpp :: pop_back |
Cpp :: continue c++ |
Cpp :: string substr c++ |
Cpp :: priority queue c++ |
Cpp :: indexing strings in c++ |
Cpp :: convert unsigned long to string c++ |
Cpp :: for loop c++ |
Cpp :: hello world in c++ |
Cpp :: palindrome program in c++ |
Cpp :: sizeof operator in c++ |
Cpp :: how to empty an array c++ |
Cpp :: bubblesort c++ |
Cpp :: function in c++ |
Cpp :: cpp getter as const |
Cpp :: c++ check if string is isogram |
Cpp :: compute power of number |
Cpp :: c++ operator overloading |
Cpp :: input n space separated integers in c++ |
Cpp :: how to say hello world in c++ |
Cpp :: print hello world c++ |
Cpp :: difference between --a and a-- c++ |
Cpp :: how to write a template c++ |
Cpp :: prime number c++ |
Cpp :: changing values of mat in opencv c++ |