It seems they are the same as on this page:
http://home.adelphi.edu/~stemkoski/mathematrix/constant.html
Atleast for the fractional part.

g=: 13 :'(+%)/y$1x' NB. removed the \ making things slower, only returning
the last result

]B=: g 200

digits_g =: 0j50 ": B
NB. first 100 digits from the website, spliced for wrapping issues
dw=:'0.6180339887 4989484820 4586834365 6381177203 0917980576'
dw=: dw , '2862135448 6227052604 6281890244 9707207204 1893911374'

NB. check whether first 52 characters match (52 due to '0.'), excluding
spaces:
dg -: 52{.(#~ ' '~:])dw

1

Jan-Pieter


2014-02-24 11:10 GMT+01:00 Linda Alvord <lindaalv...@verizon.net>:

> Ric, are these 50 digits correct.  Is it doing the "long division" to get
> the answer?
>
> Linda
>
> -----Original Message-----
> From: programming-boun...@forums.jsoftware.com
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda
> Alvord
> Sent: Monday, February 24, 2014 5:01 AM
> To: programm...@jsoftware.com
> Subject: Re: [Jprogramming] A Tale Without End
>
> Nice. This is all it takes in a fresh start in J:
>
> g=: 13 :'(+%)/\y$1x'
>
>    ]B=:0{|.g 200
>
> 453973694165307953197296969697410619233826r280571172992510140037611932413038
> 677189525
>
>    0j50 ": B
> 1.61803398874989484820458683436563811772030917980576
>
> Is this the same  j of complex numbers or is it the fact that  0j50 x:  is
> special code?
>
> Linda
>
>
> -----Original Message-----
> From: programming-boun...@forums.jsoftware.com
> [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Don Guinn
> Sent: Monday, February 24, 2014 12:59 AM
> To: Programming forum
> Subject: Re: [Jprogramming] A Tale Without End
>
> Use the inverse of x: to convert rational to real (floating point):
>
>    [r=:x:^:_1 B
>
> 1.61803
>
>    3!:0 r
>
> 8
>
>
> To display the value more accurately use format (":):
>
>    0j42":B
>
> 1.618033988749894848204586834365638117720309
>
>
> On Sun, Feb 23, 2014 at 6:41 PM, Linda Alvord
> <lindaalv...@verizon.net>wrote:
>
> > I just saw that there are several other ways to get the golden ration.
> > Before I look at them I don't know how to change the rational numbers  A
> > and  B  to decimals with many digits.
> >
> >    g=: 13 :'(+%)/\y$1x'
> >    g
> > [: (+ %)/\ 1x $~ ]
> >
> >
> >    A=:0{|. g 100
> >
> >    A
> > 573147844013817084101r354224848179261915075
> >
> >
> >    B=:0{|. g 200
> >    B
> >
> >
>
> 453973694165307953197296969697410619233826r280571172992510140037611932413038
> > 677189525
> >
> > Linda
> >
> > -----Original Message-----
> > From: programming-boun...@forums.jsoftware.com
> > [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of PMA
> > Sent: Sunday, February 23, 2014 3:48 PM
> > To: programm...@jsoftware.com
> > Subject: Re: [Jprogramming] A Tale Without End
> >
> > My favorite..
> >
> >      -:>:%:5
> > 1.61803
> >
> >
> > Nimp O wrote:
> > > 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
> >
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.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
>
> ----------------------------------------------------------------------
> 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