“Given that Pi can be estimated using the function 4 * (1 – 1/3 + 1/5 – 1/7 + …) with more terms giving greater accuracy, write a function that calculates Pi to an accuracy of 5 decimal places.” http://programmers.blogoverflow.com/2012/08/20-controversial-programming-opinions/

# 5 decimal places of pi

Advertisements