How to do exponentiation in clojure?

前端 未结 13 1825
执笔经年
执笔经年 2021-01-30 12:32

How can I do exponentiation in clojure? For now I\'m only needing integer exponentiation, but the question goes for fractions too.

13条回答
  •  爱一瞬间的悲伤
    2021-01-30 12:47

    When this question was originally asked, clojure.contrib.math/expt was the official library function to do this. Since then, it has moved to clojure.math.numeric-tower

提交回复
热议问题