Reputation:
I've seen many ways to develop a power function in Clojure (recursion, using reduce, loop, etc), but none of them accepts negative exponents...
reduce
loop
Can I do this without depending on Java's Math/pow?
Math/pow
Upvotes: 1
Views: 1019
Reputation: 4748
Here is a hint of how you could use the regular algorithms:
Upvotes: 5