Blog Archives

A simple pi program

This is pi.c, a simple program for calculating the digits of pi using Machin’s formula. The program supposes use of Linux/gcc on an i386 machine. It uses gcc’s ‘long long’ datatype (integers of 64 bits). Compile with cc -o pi -O2 pi.c The default precision of the calculation is 10,000 digits. Change this by means […]

Read More Author Posted in Comments: 0 responses
Simplue WordPress theme, Copyright © 2013 DicasLivres.org Simplue WordPress theme is licensed under the GPL.