> Calculating R took maybe an hour This is almost certainly due to a performance bug in 1 f/\. y and more basically in f/\y when y is extended precision. e.g.
6!:2 '>./\ x' [ x=: 1000 [EMAIL PROTECTED] 1000x 0.311459 6!:2 '>./\ x' [ x=: 2000 [EMAIL PROTECTED] 1000x 1.35379 6!:2 '>./\ x' [ x=: 4000 [EMAIL PROTECTED] 1000x 6.72068 Similar timings for 1 >./\.x . These have been fixed for the next J6.02 beta. In comparison: 6!:2 '>./\. x' [ x=: 1000 [EMAIL PROTECTED] 1000x 0.000956267 6!:2 '>./\. x' [ x=: 2000 [EMAIL PROTECTED] 1000x 0.00187817 6!:2 '>./\. x' [ x=: 4000 [EMAIL PROTECTED] 1000x 0.0050445 These should also have been the times for >./\x . ----- Original Message ----- From: Raul Miller <[EMAIL PROTECTED]> Date: Wednesday, December 12, 2007 9:38 Subject: Re: [Jprogramming] 61 statements To: Programming forum <[email protected]> > On Dec 12, 2007 10:14 AM, Arie Groeneveld > <[EMAIL PROTECTED]> wrote: > > The last 10 digits of X for n=12197 are: 5161600000. > > The number of digits of X is 4365. > > R =: allbut2 12197 > fmtR=:":R > #fmtR > 5281 > _20{.fmtR > 48320401091212800000 > > > This was with > > allbut2=:3 :0"0 > n=.1+i.y > p=.n e. i.&.(p:inv) y > s=.last (adj p)*.+./"1(> 1 >./\. ])_ q:n > *./x:n^-.s +. last p *.adj s > ) > > adj=:[: +./ 1 _1 |.!.0"0 1 ] > last=:</\&.|. > > Calculating R took maybe an hour (and I set J's priority to > "idle" so > I could use > my machine for other purposes). Formatting R was almost instant. > > Calculating R could probably be made significantly faster. > > -- > Raul > ----------------------------------------------------------------- > ----- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
