This folder contains JS functions that generate mathematical constants with arbitrary precision.

Pi takes one arg, the desired number of digits, and generates a string containing pi at the specified precision, employing the Machin formula.

The code is a modified version of Ken Ward's original code at http://www.trans4mind.com/personal_deve ... Machin.htm, inspired by a C program by Pascal Sebah.

Example

Pi(30) will yield "3.141592653589793238462643383279"

This is an example of a considerably lengthy JavaScript function. (At 5K size too large to be viewed in the Definition text field, you need to recall the variable in the calculator, if you want to view it; or, better yet, email or upload the data on view on your computer.)

If you wrote a function that computes another constant at arbitrary precision, please consider contributing it to this library.