2018-08-04 19:35 GMT+08:00 Marc Feeley
<feeley@iro.umontreal.ca>:
> On Aug 4, 2018, at 11:14 AM, Adam <
adam.mlmb@gmail.com> wrote:
>
> Hi,
>
> How do you do Log N, Log 2 and Log 10 in Gambit?
>
> Thanks!
> Adam
> (exp 1)
2.718281828459045
> (log (exp 1))
1.
> (/ (log 1000) (log 10))
2.9999999999999996
> (/ (log 1024) (log 2))
10.
While this may understandably appear trivial for you, would you mind to give one minute to spell out the code for
(define (log2 n) ...)
(define (log10 n) ...)
(define (logn n base) ...)
?