Jump to content

Pi: Difference between revisions

(Added 11l)
Line 2,942:
 
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
the strings in the six-dimensional state vector, [q, r, t, k, n, l].
The output shows that the space requirements of the Gibbons
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.
# The "bigint" functions needed are:
needed are:# long_minus long_add long_multiply long_div
 
def pi_spigot:
2,485

edits

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