Pi: Difference between revisions

Content added Content deleted
(Added 11l)
Line 2,942: Line 2,942:


The annotation defined here results in a triple for each digit of pi:
The annotation defined here results in a triple for each digit of pi:
[index, digit, space], where "space" is the the sum of the lengths of
[index, digit, space], where "space" is the sum of the lengths of
the strings in the six-dimensional state vector, [q, r, t, k, n, l].
the strings in the six-dimensional state vector, [q, r, t, k, n, l].
The output shows that the space requirements of the Gibbons
The output shows that the space requirements of the Gibbons
spigot grow very slightly more than linearly.
spigot grow very slightly more than linearly.


<lang jq># The Gibbons spigot, in the mold of the [[#Groovy]] and ython]] programs shown on this page.
<lang jq># The Gibbons spigot, in the mold of the [[#Groovy]] and [[#ython]] programs shown on this page.
# The "bigint" functions
# The "bigint" functions needed are:
needed are: long_minus long_add long_multiply long_div
# long_minus long_add long_multiply long_div


def pi_spigot:
def pi_spigot: