Just ported the source to powerUP (TM) with SAS/C for PPC.
Did not change the source, just added the necessary makefile,
SCOPTIONS and updated the docs. Deleted all the .info files.
68k version is available as misc/sci/troepfel.lha (000/020).
Comparision:
6500 digits of PI
020-Version (68040-25) 771.98 sec 8.41 digits/sec
PPC-Version (604-200) 69.40 sec 93.64 digits/sec
Note, that the program makes heavy use of standard I/O, so the
PPC actually might be MUCH faster than it seems - to check that
out, one probably could try setting a larger buffer for the
standard ANSI level 2 file I/O functions.
Also, there seems to be a bug in the program, which
makes it impossible to let it calc more than ~6500 digits
(somewhere between 6500 and 6600 an internal "overflow"
is generated).
***
This program calculates pi or e to as many digits as you want with the
"troepfel" algorithm. This Program refers to an articel in "Spektrum
der Wissenschaft", Vol. 12, 1995 (the german issu of "Scientific
American"). This package contains a 68000 and 68020 version (no fpu
necessary), a description in AmigaGuide format (completely in German,
sorry) and the ANSI-C source code (SAS-C 6.55, gcc) (documented in English).
Under UNIX with gcc it is selfcompiling, just type: "sh Troepfel.c".
Files in this archive:
e10000.txt - First 10000 digits of e
pi10000.txt - First 10000 digits of pi
Troepfel000 - 68000 Executable
Troepfel020 - 68020+ Executable
Troepfel.guide - German dokumentation in AmigaGuide-Format
Troepfel.c - Source for the main program
ETroepfel.c - Source for e-calculation
PiTroepfel.c - Source for pi-calculation
Troepfel.h - Function declarations of ETroepfel and PiTroepfel
SCoptions - SAS-C Compiler options
Troepfel.readme - This readme
Georg Pfundt
(09-JAN-1996)
|