Clojure often leaves implementations to the backing platforms, and Clojurescript probably has no difference in the methods of the different numerical types. Java does, so you'd have to fall back on that. Something like:
(defn big-or [f & r] (reduce (fn [acc v] (.or acc (biginteger v))) (biginteger f) r)) (defn big-and [f & r] (reduce (fn [acc v] (.and acc (biginteger v))) (biginteger f) r)) (defn big-xor [f & r] (reduce (fn [acc v] (.xor acc (biginteger v))) (biginteger f) r)) A lot of (mathemathical) operations need falling back to the platform, and this is by design for clojure. There are however libraries that are intended to abstract away the differences, and one of those for math is clojure.math.numeric-tower. A numeric type independent implementation for bitwise operations would be a fitting pull request there. On Tuesday, May 26, 2020 at 6:39:51 PM UTC+2, Harmon Nine wrote: > > Hello. > > I noticed a post about this from 2013, so doing a bump. > > The bit-wise operators appear to be supported for 'bigint' in > ClojureScript, but not in Clojure. Is support for these operations on > 'bigint' in Clojure a future enhancement? > > Thanks :) > -- Harmon > -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/e8fe6493-4458-4a60-b9f5-902dbc2abf07%40googlegroups.com.