I am trying to use expt
function according to this answer but when I try to do (use 'clojure.math.numeric-tower)
in REPL I get the error
user> (use 'clojure.math.numeric-tower)
(use 'clojure.math.numeric-tower)FileNotFoundException Could not locate clojure/math/numeric_tower__init.class or clojure/math/numeric_tower.clj on classpath: clojure.lang.RT.load (RT.java:443)
I thought I needed to put Leiningen dependency information as explained here
[org.clojure/math.numeric-tower "0.0.2"]
in my project.clj
, and I did that but I still get the same error. What am I doing wrong?
EDIT
As in this answer I went to my project directory and did lein deps
a@b:~/command-line-args$ lein deps
Retrieving org/clojure/math.numeric-tower/0.0.2/math.numeric-tower-0.0.2.pom from central
Retrieving org/clojure/math.numeric-tower/0.0.2/math.numeric-tower-0.0.2.jar from central
a@b:~/command-line-args$
but I still get the same error in REPL.
Edit2
As per Vidya's answer I am trying to use Pomegranate but without success. This is what I tried. What am I doing wrong:
user> (use '[cemerick.pomegranate :only (add-dependencies)])
nil
user> (add-dependencies :coordinate '[[org.clojure/math.numeric-tower "0.0.2"]]
:repositories (merge cemerick.pomegranate.aether/maven-central
{"clojars" "http://clojars.org/repo"}))
{}
user> (require '(numeric-tower core stats charts))
FileNotFoundException Could not locate numeric_tower/core__init.class or numeric_tower/core.clj on classpath: clojure.lang.RT.load (RT.java:443)
user> (require 'clojure.contrib.math)
FileNotFoundException Could not locate clojure/contrib/math__init.class or clojure/contrib/math.clj on classpath: clojure.lang.RT.load (RT.java:443)
user>