Brian Watkins <wildu...@gmail.com> writes: > I'll try rem for time but I see that I still have to cast to long; > Clojure doesn't think (rem (long xxxx) (long xxxxx)) is a long. The > error is "recur arg for primitive local: nf must be matching > primitive."
Looks like it's casting it back to an integer. Also looks like rem isn't inlined so it's going to be boxed in any case. (class (rem (long 1) (long 2))) ;; => java.lang.Integer Try using unchecked-remainder instead, which *is* inlined and also shouldn't do any casting (it should be exactly the java % operation without any extra checks or boxing). (class (unchecked-remainder (long 1) (long 3))) ;; => java.lang.Long -- 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