On Jun 28, 8:53 am, Handkea fumosa <hfum...@gmail.com> wrote:
> (defn foo [z-r z-i c-r c-i bailout max-iters]
>   (let [G__12819 (double c-r)
>         G__12820 (double c-i)
>         G__12817 (double -1)
>         G__12818 (double 2)
>         mi (int max-iters)
>         b (double (* bailout bailout))]
>     (loop [G__12815 (double z-r)
>            G__12816 (double z-i)
>            i (int 0)]
>       (if (> i mi)
>         :iters
>         (if (> (+ (* G__12815 G__12815) (* G__12816 G__12816)) b)
>           i
>           (recur
>             (+ (* G__12815 G__12815) (* G__12817 G__12816 G__12816)
> G__12819)
>             (+ (* G__12818 G__12815 G__12816) G__12820)
>             (unchecked-inc i)))))))
>
> #<CompilerException java.lang.RuntimeException:
> java.lang.IllegalArgumentException: recur arg for primitive local:
> G__12815 must be matching primitive (foo.clj:391)>
>
> The recur arg in question is  (+ (* G__12815 G__12815) (* G__12817
> G__12816 G__12816) G__12819) all of whose operands are doubles.
>
> This seems buggy.
<snip>

This is just a hunch, but maybe it's because you have three operands
on +? it's inlined only for two operands,
and uses reduce for more. Thus, your arguments might be getting boxed.

Try explicitly calling + (and *) with only two arguments at a time.

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