calculates pi to the nth term using the  BBP algorithm