Calculate pi decimals
by Jonas Lundgren
19 Mar 2008
(Updated 14 Nov 2011)
Calculate pi decimals with Machin's formula
pi = 16*acot(5) - 4*acot(239)
|
Watch this File
|
| File Information |
| Description |
MACHIN0 is the original and handsome code.
MACHIN is a faster version (at least a factor pi) but a less readable code. MACHIN gives you 100000 digits in a minute.
MACHIN is correct at least up to 10 million digits (~ 3 days). If you try 100 million digits you will get the wrong answer after one year.
Do you need more digits faster? Try
http://numbers.computation.free.fr/Constants/PiProgram/pifast.html
|
| MATLAB release |
MATLAB 7.11 (2010b)
|
|
Tags for This File
|
| Everyone's Tags |
|
| Tags I've Applied |
|
| Add New Tags |
Please login to tag files.
|
| Comments and Ratings (2) |
| 20 Mar 2008 |
John D'Errico
|
|
|
| 12 Nov 2011 |
Thomas
|
|
|
| Updates |
| 26 Sep 2011 |
New contact information |
| 14 Nov 2011 |
Faster version |
|
Contact us at files@mathworks.com