PI - a pi generator algorithm

April 1999
Lennert Sluyk (Sluykie@hotmail.com)

Here's a pi generator algorithm for the Psion
organiser 2. I bumped into it on the HPCalc archive
(http://www.hpcalc.org) and translated it from RPL to
OPL.
Please read the included pigen.txt for further details
about the algorithm itself.

There are 4 files included.

- PI.OPL
- PIGEN$.OPL
- pigen.txt   @the HP28 file
- PiOrg2.txt    @this file

PI.OPL is the calling procedure. Input the number of digits.
PI.OPL makes an output file on A: called PIGEN99.ODB. If the file
exists on A: it is opened.

PIGEN$.OPL does the actual work. It makes a temporary file
PITEMP99.ODB that simulates an array. PITEMP99.ODB is deleted
if it already exists on A:. If PITEMP99.ODB is no longer needed
then it's deleted.

The maximum number of digits that can be passed to PIGEN$.OPL
is 249. If you try 250, it fails on a STRING TOO LONG error
for c$.

By the way. I ran this program only in the developer kit and not
on the Organiser itself.

15.04.99 LRS

-----------------------------------------------------------------------------
The Psion Organiser II Homepage: http://www.org2.com     email: jaap@org2.com
