On Jun 18, 2010, at 22:02 , Daniel wrote:

> This also seems to break the principle of make it work, make it right,
> make it fast.  Math in Clojure isn't to the point that it works well
> yet.

Daniel the decision was to keep things working and add speed as an option by 
using +' (and friends) specifically. So actually what happened is exactly what 
you wished for :).


Just tested with the newest code:

user=> (defn fact [n] (if (zero? n) 1 (*' n (fact (dec' n))))) 
#'user/fact
user=> (fact 42)
java.lang.ArithmeticException: integer overflow (NO_SOURCE_FILE:3)
user=> (defn fact [n] (if (zero? n) 1 (* n (fact (dec n)))))   
#'user/fact
user=> (fact 42)
1405006117752879898543142606244511569936384000000000N


Regards,
Heinz

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to