Of course, TANSTAAFL: the auto-promoting version of the functions will
be slower than their primitive counterparts.

On Dec 14, 6:23 pm, Benny Tsai <benny.t...@gmail.com> wrote:
> As Brian said, primitive math is now the default in 1.3.  If auto-
> promotion on overflow is desired, you can use the +', -', *', inc',
> dec' functions (note the single quote suffix).
>
> http://dev.clojure.org/display/doc/Enhanced+Primitive+Support
>
> On Dec 14, 5:36 pm, Brian Goslinga <quickbasicg...@gmail.com> wrote:
>
>
>
>
>
>
>
> > On Dec 14, 6:30 pm, Miki <miki.teb...@gmail.com> wrote:> (defn fact [n] 
> > (reduce * (range 1 (inc n))))
> > > (fact 100)
>
> > > This produces the right result on 1.2 but "ArithmeticException integer
> > > overflow" on 1.3-alpha4.
> > > Is this intentional?
>
> > Primitive math is the default in 1.3

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