## D - sample program pi.d

"Jim Jennings" <jwjenn mindspring.com> writes:
program \dmd\samples\d\pi.d gives the results below.

pi -1 gives:
pi = 0.
0 seconds to compute -1 digits of pi

pi 0 gives:
pi = 0.
0 seconds to compute 0 digits of pi

pi 4000 gives:
Error: ArrayBoundsError pi.d(114)

Sayeth BS, "Oops"
Mar 12 2003
"Jim Jennings" <jwjenn mindspring.com> writes:
"Jim Jennings" <jwjenn mindspring.com> wrote in message
news:b4ov8d$2ti5$1 digitaldaemon.com...
program \dmd\samples\d\pi.d gives the results below.

pi -1 gives:
pi = 0.
0 seconds to compute -1 digits of pi

pi 0 gives:
pi = 0.
0 seconds to compute 0 digits of pi

pi 4000 gives:
Error: ArrayBoundsError pi.d(114)

Sayeth BS, "Oops"
pi 1 pi = 3.2 Oops! 0 seconds to compute 1 digits of pi pi 2 pi = 3.12 Oops! 0 seconds to compute 2 digits of pi pi 3 pi = 3.140 0 seconds to compute 3 digits of pi This thing needs a running start.
Mar 12 2003