Скачать PI5.PAS - Calculating the PI up to 2150 places

13.05.1996
Скачать файл (4,96 Кб)

PROGRAM PI5.PAS


By David Adamson
October 23, 1994

This it the third version of a program for computing Pi up to 2150 places.

The first version was written in Turbo Pascal 3. The second was also in Turbo Pascal, but with all the math procedures converted to inline for maximum program executing speed.

This version is rewritten to allow compilation with Turbo Pascal 5 and up.

The inline code was scrapped for version 3. The sacrifice in speed is not a problem, because it improvement in today's computers overshadows the processing efficiency loss.

Here are my results using a 33MHz 386.

Pi v2                               Pi v3
100  places =  0.1 sec              100  places =   0.3 sec
1000 places = 11   sec              1000 places =  32   sec
2135 places = 48   sec              2135 places = 150   sec