Per Alex Osborne's reference to BigInteger constructors, here's a
random BigInteger function:
(defn rand-bigint [#^BigInteger bign, #^Random rnd]
(let [bits (inc (.bitLength bign))
bigr (BigInteger. bits rnd)]
(-> bign (.multiply bigr) (.shiftRight bits))))
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en