Logarithm | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Logarithm

What's logarithm in C++?

19th Jul 2019, 6:18 PM
Mohammadmahdi Sefatzadeh
Mohammadmahdi Sefatzadeh - avatar
3 Answers
+ 4
There is a logarithm function in C++. It's "log" after importing math.h. You can find more info here: http://www.cplusplus.com/reference/cmath/log10/. Hope it helps you 😉
19th Jul 2019, 6:25 PM
TheWh¡teCat 🇧🇬
TheWh¡teCat 🇧🇬 - avatar
+ 2
The logarithm to a base b (e.g. 10) of a number is the value which if b is raised to the power of by gives you back the original number. This is not to confused with algorithm which is a set of steps or a procedure to follow to achieve a certain result or to solve a problem.
20th Jul 2019, 1:25 AM
Sonic
Sonic - avatar
0
By library "cmath" for: - ln(x) ---> log(x) - log_b=10 ---> log10(x)
20th Jul 2019, 1:52 AM
Manuel Pinzón G.