/
proc
/
3430793
/
cwd
/
usr
/
share
/
doc
/
gawk
/
examples
/
prog
/
File Upload :
llllll
Current File: //proc/3430793/cwd/usr/share/doc/gawk/examples/prog/pi.awk
# pi.awk --- compute the digits of pi # # Katie Wasserman, katie@wass.net # August 2014 BEGIN { digits = 100000 two = 2 * 10 ^ digits pi = two for (m = digits * 4; m > 0; --m) { d = m * 2 + 1 x = pi * m intdiv0(x, d, result) pi = result["quotient"] pi = pi + two } print pi }
Copyright ©2k19 -
Hexid
|
Tex7ure