I am aware of racket's log
function, which computers the natural logarithm of a number. I am trying to find the logarithms of numbers raised to arbitrary bases. In other words, instead of this:
> (log 9)
2.1972245773362196
I would like to do something similar to this:
> (logarithm 3 9)
2
Is there a function anyone knows about either builtin to Racket or available in a module from PLaneT I can use like this?
(expt b (* x y))
is equivalent to(expt (expt b x) y)
. Since logarithms are the inverse of exponentiation, this explains why the formula works. This was high school algebra when I took it 35 years ago. – Varnish