The goal of primitive math is better performance in the common case. The 
implementation makes the assumptions that Java long is big enough for nearly 
all cases, and that auto-promotion to BigInteger (and the resulting 
performance hit) is rarely desirable.

The + function still promotes, it just promotes everything to long or 
double. If you want BigInts or BigDecimals, just insert one of them into the 
calculation, and everything else will get promoted to BigInt or BigDecimal.

The only difference between + and +' is that +' will promote to BigInt if 
you overflow a long, whereas + will thrown an exception.

-- 
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