Posted By

ef on 05/28/12


Tagged

Logarithm log2


Versions (?)

Logarithm with base 2 (log2)


 / Published in: Clojure
 

Implementation of base2 logarithm

  1. (defn log2 [n]
  2. (/ (Math/log n) (Math/log 2)))

Report this snippet  

You need to login to post a comment.