In this instance Newton's method gives the same results as the following (
http://www.jsoftware.com/jwiki/Essays/Fibonacci%20Sequence#Matrix_power):

   M=: 0 1,:1 1x
   +/ .*~^:5 M
1346269 2178309
2178309 3524578
   % %/ {: +/ .*~^:5 M
3524578r2178309

   (1 + ] - *:) N^:5 ] 1
3524578r2178309

   f=: 3 : '(% %/ {: +/ .*~^:y M) = (1 + ] - *:) N^:y 1'
   f"0 i.15
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Basically, 2^n digits with n iterations.




On Mon, Feb 24, 2014 at 5:08 AM, Nimp O <tr...@outlook.com> wrote:

> Another nice way to get a lot of digits from the golden ratio is using
> Newton's Method.
>
> In : http://www.jsoftware.com/jwiki/Essays/Newton%27s%20Method
> N=: 1 : '- u % u d. 1'
>
> correct50 =: '1.61803398874989484820458683436563811772030917980576'
>    0j50 ": (1 + ] - *:) N^:7 ] 1
> 1.61803398874989484820458683436563811772030917980576
>    correct50 -: 0j50 ": (1 + ] - *:) N^:7 ] 1
> 1
>
>
>    # correct1000 =:
> '1.6180339887498948482045868343656381177203091798057628621354486227...'
> 1002
>
>    correct1000 -: 0j1000 ": (1 + ] - *:) N^:12 ] 1
> 1
> You can get 50 correct digits in 7 iterations and 1000 digits in 12!
>
>
>
>
>
> > Here are the first 100 digits using this J function:
> >
> >    0j101 ":B
> >
> 1.61803398874989484820458683436563811772030917980576286213544862270526046281
> > 890244970720720418939113748
> >
> > Linda
>
>
> ----------------------------------------------------------------------
> 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