How in C++ take logarithm based on E?
Answer 1, Authority 100%
Standard suitable Std :: Log ?
UPD
Now and with an example.
We add at the top of the include list #include & lt; Cmath & gt;
.
In the right place we use
double x = 10.0;
Double LX = STD :: LOG (X); // counted
STD :: COUT & LT; & LT; "log (x) =" & lt; & lt; LX & LT; & LT; '\ n'; // Printed "log (x) = 2.30259"
Answer 2, Authority 25%
Use the STD :: Log function from the CMATH library.