h=: 13 :'(+%)/\y$1' 
  
   h 16
1 2 1.5 1.66667 1.6 1.625 1.61538 1.61905 1.61765 1.61818 1.61798 1.61806
1.61803 1.61804 1.61803 1.61803
   
   i=: 13 :'(+%:)/\0,y$1'
   
   i 16
0 1 1.41421 1.55377 1.59805 1.61185 1.61612 1.61744 1.61785 1.61798 1.61802
1.61803 1.61803 1.61803 1.61803 1.61803 1.61803
   
   h
[: (+ %)/\ 1 $~ ]
   i
[: (+ %:)/\ 0 , 1 $~ ]
   
   
Your version seems to converge more quickly.

Linda
-----Original Message-----
From: programming-boun...@forums.jsoftware.com
[mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Nimp O
Sent: Sunday, February 23, 2014 3:40 PM
To: programm...@jsoftware.com
Subject: Re: [Jprogramming] A Tale Without End

And also..

   (+ %:)/ 0,20$1
1.61803

> Date: Sun, 23 Feb 2014 20:11:11 +0000
> From: bojac...@yahoo.dk
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] A Tale Without End
> 
>    {.>{:p. 1 1 _1
> 1.61803
s.htm
                                          
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to