Calculate the logarithm of a number in any base, including natural log.
logb(x) = ln(x) / ln(b). Natural log (ln) uses base e ≈ 2.71828.