upscheme/femtolisp/pisum.lsp

9 lines
208 B
Plaintext
Raw Normal View History

2008-06-30 21:54:22 -04:00
(defun pisum ()
(dotimes (j 500)
((label sumloop
(lambda (i sum)
(if (> i 10000)
sum
(sumloop (+ i 1) (+ sum (/ (* i i)))))))
1.0 0.0)))