Computes the value of PI using infinite series.