This page contains some easy C source code for constants computation.
Any comments are welcome : firstname.lastname@example.org.
The following C files contain a short and very basic approach of the binary splitting method to compute e (see the algorithm description in Binary splitting method).
Those C codes are just learning programs to permit a better understanding of the techniques used (FFT and binary splitting). Many speed or memory optimizations can be done. A really efficient program (such as the one used for PiFast for example) could save a factor of order 10 for the time and 4 for the memory.
The program runs in quasi-linear time. Here are the timings on my machine (PentiumII 350) :
|Number of digits||Memory used||Time|
|250000||9.2 Mo||24 seconds|
|500000||18.4 Mo||54 seconds|
|1 million||36.8 Mo||124 seconds|
|2 millions||73.7 Mo||286 seconds|
Any comments are welcome : email@example.com,
mathematical constants and computation