• (expt base pow)
(expt base pow) is base to the pow power.
Returns an exact number if the base is an exact number and the power is an integer, otherwise returns a double.

1 Example top

  • (use '[clojure.contrib.math :only [expt]])
    
    user=> (expt 2 100)
    1267650600228229401496703205376
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/math.clj:101 top

(defmulti ^{:arglists '([base pow])
	     :doc "(expt base pow) is base to the pow power.
Returns an exact number if the base is an exact number and the power is an integer, otherwise returns a double."}
  expt (fn [x y] [(class x) (class y)]))
Vars in clojure.contrib.math/expt: defmulti fn
Used in 0 other vars

Comments top

No comments for expt. Log in to add a comment.