- Decimal Places
How many digits of π to be approximated. Increasing the value of this number will slow down calculations. Setting this number in the high thousands may cause a timeout, but the option has been provided nonetheless.

- Loops
How many iterations to perform when approximating π. Increasing the value of this number will increase the accuracy of the approximation, but as a result, will slow down calculations. Setting this number in the high hundreds may cause a timeout as well.

- Algorithm
The mathematical procedure for approximating π. In the πculator, the algorithms are identified by the names of their creators. Some such examples are "Chudnovsky" and "Leibniz".

- Dynamic
The πculator is run in "dynamic mode" by clicking the button to the right of the corresponding algorithm button. When run in dynamic mode, the number of loops provided is used as a maximum, and the page continually updates with a more accurate version of π until the desired number of decimal places have been accurately calculated.

As the calculations progress, the πculator shows how much each decimal place has changed from the previous loop. This is represented in the background colour of the individual decimal places. If the background is transparent, the decimal place has not changed, otherwise, the background colour will range from green to red, green being a smaller change, red being a larger change.

Colours corresponding to change in decimal place value:

`0123456789`

`from decimal import getcontext, Decimal`

getcontext().prec = 50 + 2

loops = 10

def pi_method_bailey_borwein_plouffe():

p1 = Decimal('1')

p2 = Decimal('2')

p4 = Decimal('4')

p5 = Decimal('5')

p6 = Decimal('6')

p8 = Decimal('8')

p1o16 = p1 / Decimal('16')

answer = Decimal('0')

for x in xrange(loops):

x = Decimal(x)

p8x = p8 * x

answer += p1o16 ** x * (

(p4 / (p8x + p1)) -

(p2 / (p8x + p4)) -

(p1 / (p8x + p5)) -

(p1 / (p8x + p6))

)

return answer