How To Compute a Base-Change in Logarithms

One of the problems people may face in Computer Science, is a CPU only capable of computing a logarithm in one base, say 2, but the need to compute a logarithm in another base, say (e). The way to convert is as follows:

c log2(t) == logb(t)

If (t == b), it follows that:

c log2(b) == logb(b) == 1


c = 1 / log2(b)



Print Friendly, PDF & Email

One thought on “How To Compute a Base-Change in Logarithms”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>