How is the split-up calculation different (in terms of complexity) from 1+28433* (*+:) 2x^3915228 ?
It seems that the partial1 and partial2 computations are doing exactly the same job. Marshall -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Devon McCormick Sent: Wednesday, July 06, 2011 6:29 PM To: Programming forum Subject: Re: [Jprogramming] Large numbers This took 0:46:37 in J and 0:53:28 in bc on my XP machine. However, when I split the calculation into pieces, it was finished in less than 15 minutes. I ran the following two scripts simultaneously, using "fork" (which took about six minutes), then loaded the results and made the final calculation: load&.>'partial1.ijs';'partial2.ijs' +++ +++ 6!:2 'ans0=. 1+28433*partial1*partial2' 518.91352 10{.":ans0 7772839072 #":ans0 2357207 The results above were produced by these two scripts: NB.* large1.ijs: portion of large calculation. ans1=. 2x^3915228 ('partial1=: ','x',~,":ans1) 1!:2 <'partial1.ijs' 2!:55'' NB.* large2.ijs: portion of large calculation. ans2=. 2x^3915229 ('partial2=: ','x',~,":ans2) 1!:2 <'partial2.ijs' 2!:55'' On Wed, Jul 6, 2011 at 3:19 PM, Tracy Harms <[email protected]> wrote: > Yes, that makes more sense to me, too, with a bit more thought. > > > On Wed, Jul 6, 2011 at 1:33 PM, Raul Miller <[email protected]> wrote: > > > Mine is: > > 1 + 28433 * 2 ^ 7830457x > > > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
