Jump to content

Metallic ratios: Difference between revisions

Added Quackery.
m (syntax highlighting fixup automation)
(Added Quackery.)
Line 1,453:
after 613 iterations:
1.618033988749894848204586834365638117720309179805762862135448622705260462818902449707207204189391137484754088075386891752126633862223536931793180060766726354433389086595939582905638322661319928290267880675208766892501711696207032221043216269548626296313614
</pre>
 
=={{header|Quackery}}==
 
<syntaxhighlight lang="Quackery"> [ $ "bigrat.qky" loadfile ] now!
 
[ [ table
$ "Platinum" $ "Golden"
$ "Silver" $ "Bronze"
$ "Copper" $ "Nickel"
$ "Aluminium" $ "Iron"
$ "Tin" $ "Lead" ]
do echo$ ] is echoname ( n --> )
 
[ temp put
' [ 1 1 ]
13 times
[ dup -1 peek
temp share *
over -2 peek +
join ]
temp release ] is task1 ( n --> [ )
 
[ temp put
' [ 0 1 1 ]
[ dup -3 split nip
do dip dup
33 approx= if done
dup -1 peek
temp share *
over -2 peek +
join
again ]
temp release
dup size 3 - swap
-3 split nip
-1 split drop
do swap rot ] is task2 ( n --> n/d n )
 
10 times
[ i^ echoname cr
i^ task1
witheach [ echo sp ] cr
i^ task2
echo sp
32 point$ echo$
cr cr ]</syntaxhighlight>
 
{{out}}
 
<pre>Platinum
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1
 
Golden
1 1 2 3 5 8 13 21 34 55 89 144 233 377 610
80 1.61803398874989484820458683436564
 
Silver
1 1 3 7 17 41 99 239 577 1393 3363 8119 19601 47321 114243
44 2.4142135623730950488016887242097
 
Bronze
1 1 4 13 43 142 469 1549 5116 16897 55807 184318 608761 2010601 6640564
33 3.30277563773199464655961063373524
 
Copper
1 1 5 21 89 377 1597 6765 28657 121393 514229 2178309 9227465 39088169 165580141
28 4.23606797749978969640917366873128
 
Nickel
1 1 6 31 161 836 4341 22541 117046 607771 3155901 16387276 85092281 441848681 2294335686
24 5.19258240356725201562535524577019
 
Aluminium
1 1 7 43 265 1633 10063 62011 382129 2354785 14510839 89419819 551029753 3395598337 20924619775
22 6.16227766016837933199889354443274
 
Iron
1 1 8 57 407 2906 20749 148149 1057792 7552693 53926643 385039194 2749201001 19629446201 140155324408
21 7.14005494464025913554865124576351
 
Tin
1 1 9 73 593 4817 39129 317849 2581921 20973217 170367657 1383914473 11241683441 91317382001 741780739449
20 8.12310562561766054982140985597408
 
Lead
1 1 10 91 829 7552 68797 626725 5709322 52010623 473804929 4316254984 39320099785 358197153049 3263094477226
19 9.10977222864644365500113714088139
</pre>
 
1,480

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.