Re: Clojure and long auto-promotion to big decimal

2012-02-07 Thread Aaron Cohen
This was the big change in clojure 1.3 See http://dev.clojure.org/display/doc/Enhanced+Primitive+Support The expectation now is that if you are doing math that is going to overflow, you can either introduce a bigint into the chain somewhere, after which all the math will use bigints (contagion) o

Clojure and long auto-promotion to big decimal

2012-02-07 Thread Leandro Moreira
I thought clojure always did auto promotion between long and bigdecimal, but I run repl today and I notice this: (* 1000 1000 1000 1000 1000 1000 1000) raises overflow (* 1000M 1000M 1000M 1000M 1000M 1000M 1000M) this is ok So this was always working that way? or they've changed? (and if yes, wh