Almkvist-Giullera formula for pi: Difference between revisions

→‎{{header|dc}}: Add header to final pi output
(→‎{{header|Common Lisp}}: Add output header.)
(→‎{{header|dc}}: Add header to final pi output)
Line 255:
 
[* main loop: print values for first 10 terms *]sz
[N. Integral part of Nth term .................. × 10^ = Actual value of Nth term]p
0 sj
[
Line 269:
 
[* print resulting value of pi to 70 places *]sz
[Pi after ]n 52n [ iterations:]p
99k 52 lPx 70k 1 / p</lang>
 
{{Out}}
<pre>N. Integral part of Nth term .................. × 10^ = Actual value of Nth term
0. 96 -3 .09600000000000000000000000000000000000000000000000
1. 5122560 -9 .00512256000000000000000000000000000000000000000000
1,479

edits