Solution

Erlang generally uses the underlying C runtime library of your chosen operating system to provide the various mathematical primitives, including the natural logarithm (ln, which is written log in Erlang). If you want logarithms in some other base you need to use the standard mathematical relation: