Moon aka Sun (moon_aka_sun) wrote,
Moon aka Sun
moon_aka_sun

1.61803398874989…

g =: -:>:%:5           NB. (1+√5)/2

g -: <:*:g             NB. g == g²-1
g -: >:%g              NB. g == 1+1/g

g -: (>:@%)^:_ (1)     NB. 1+1/(1+1/(1+1/…)) [Fig.1]
g -: (%:@>:)^:_ (1)    NB. √(1+√(1+√(1+…)))

g -: 4%~(%:4)+%:(!4)-4 NB. g out of 4 4s
g -: (%~%:+[:%:!-]) 4  NB. the same

g -: +/%g^>:i.66       NB. g == 1/g¹ + 1/g² + 1/g³ + …  [1] [Fig.2]
1 -: +/%g^>:+:i.33     NB. 1 == 1/g¹ + 1/g³ + 1/g⁵ + …  [2]

1 -~ (1+%&g)^:_(1)     NB. [1]
(1+%&(*:g))^:_(1)      NB. g == 1/g⁰ + 1/g² + 1/g⁴ + …
g %~ (1+%&(*:g))^:_(1) NB. [2]

NB. but ^:_ uses = with default delta > 1e_13 which is not enough for -: later
g -: 1 -~ (1+%&g)^:66(1)      NB. [1]
1 -: g %~ (1+%&(*:g))^:33(1)  NB. [2]

G =: -:(10^101x)+(<.&%:)5*10^202x
(100&{.@":)"0 G,*:G
NB. 1618033988749894848204586834365638117720309179805762862135448622705260462818902449707207204189391137(48)
NB. 2618033988749894848204586834365638117720309179805762862135448622705260462818902449707207204189391137(469...)

Fig.1:

phi as infinite continued fraction

Fig.2:

phi seqries

Oффтопик бонус для заглянувших :)

Tags: j, math, phi
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments