March 13, 2003 sample program pi.d | ||||
---|---|---|---|---|
| ||||
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" |
March 13, 2003 Re: sample program pi.d | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jim Jennings | "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. |
Copyright © 1999-2021 by the D Language Foundation