Beautiful! That is definitely it. I produce many many very big bignums in this application.
Thanks so much! -Lee PS I noticed after I sent this that the subject line was wrong -- the error wasn't from rand-int, it was from my avoiding rand-int. Clojure's rand-int does the right thing. On Apr 29, 2010, at 8:50 AM, Timothy Pratley wrote: > Hi Lee, > > On 29 April 2010 22:31, Lee Spector <lspec...@hampshire.edu> wrote: > The error that I get is: > > Caused by: java.lang.IllegalArgumentException: n must be positive > at java.util.Random.nextInt(Random.java:250) > > Hopefully this will give you the clue you need: > user=> (. thread-local-random-generator (nextInt > 10000000000000000000000000000000000)) > java.lang.IllegalArgumentException: n must be positive (NO_SOURCE_FILE:0) > > Note that it is pretty easy to get a bignum as Clojure will automatically > upgrade - which I suspect is what is happening in your case. Hope that helps > > > Regards, > Tim. > > > -- > 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 -- Lee Spector, Professor of Computer Science School of Cognitive Science, Hampshire College 893 West Street, Amherst, MA 01002-3359 lspec...@hampshire.edu, http://hampshire.edu/lspector/ Phone: 413-559-5352, Fax: 413-559-5438 Check out Genetic Programming and Evolvable Machines: http://www.springer.com/10710 - http://gpemjournal.blogspot.com/ -- 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