Taking introduction to algorithms for computer science this semester and wanted to know if there is a way to calculate lg on scientific calculator? Thank you.
$\endgroup$43 Answers
$\begingroup$$lg(x) = \dfrac{\log x}{\log 2}$
where $\log$ is log base anything that is allowed.
$\endgroup$6$\begingroup$HINT: In scientific calculator $\ln x=\log_{e} x$ & $\log x=\log_{10} x$
Logarithms is defined for positive real numbers, hence in general log can be calculated as follows $$\log_{a}(b)=\frac{\log b}{\log a}$$
$\endgroup$$\begingroup$The WP-34s, an offshoot of the HP-30 calculator, has a LG button. See the picture here:
To quote that site, "The WP 34S is the most powerful scientific (non-graphing) calculator on the market. It is not an HP product, but it is rather a community-created product based on an existing HP calculator platform."
A simulation of it is available for iPhone and iPad on iTunes.
$\endgroup$