Have you tried replacing all your calls to map for pmap yet?
On 11 April 2013 03:33, Bruno Kim Medeiros Cesar <brunokim...@gmail.com>wrote: > Hello. I am replicating the study made by John D. Cook in > this<http://www.johndcook.com/blog/2013/02/25/exact-chaos/>post about exact > chaos in Clojure, using rational arithmetic. > > In summary, given the iteration formula f(x_n) = x_{n+1} = 4*x_n*(1 - > x_n), we expect chaos: no matter how close two numbers are, eventually > their sequences will diverge. The interesting fact is that this formula > admits a closed expression: x_n = sin^2(2^n asin(sqrt(x_0))). That > indicates that at each step the initial number is "stretched" by 2 and then > "folded" by the sin^2 function. If two numbers are close by 2^(-100), it is > expected they will diverge after the 100th iteration. > > So, Clojure. I've implemented an experiment to give the distance between > the sequences starting with a = 1/3 and b = a+2^(-100) in 105 steps (soon > after they depart, I hope). It is taking a long time, and using just a > single core. *Is there a way to submit each iterate to a different > core?*Also, how could I have a more interative output, seeing the sequence as > it > is calculated? > > (use 'clojure.math.numeric-tower) > (def a (/ 1 3)) > (def b (+ a (expt 2 -100))) > (defn f [x] (* 4 x (- 1 x))) > (map double > (take 105 > (map #(- %2 %1) > (iterate f a) > (iterate f b)))) > > Thanks for your attention, > > Bruno Kim Medeiros Cesar > Engenheiro de Computação > Pesquisador em Redes Complexas > www.brunokim.com.br > > -- > -- > 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. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- -- 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. For more options, visit https://groups.google.com/groups/opt_out.