Pi: Difference between revisions
Content added Content deleted
imported>Chinhouse No edit summary |
imported>Chinhouse No edit summary |
||
Line 3,955: | Line 3,955: | ||
=={{header|MiniScript}}== |
=={{header|MiniScript}}== |
||
Calculate pi using the Rabinowitz-Wagon algorithm |
|||
This implementation is for use with [http://miniscript.org/MiniMicro Mini Micro]. It uses the Rabinowitz-Wagon algorithem. |
|||
<syntaxhighlight lang="miniscript"> |
<syntaxhighlight lang="miniscript">digits = input("Enter number of digits to calculate after decimal point: ").val |
||
digits = input("Enter number of digits to calculate after decimal point: ").val |
|||
// I've seen variations of this "precision" calculation from |
// I've seen variations of this "precision" calculation from |
||
// 10 * digits |
// 10 * digits |