I\'m writing a function that calculates the value of PI, and returns it as a double. So far so good. But once the function gets to 14 digits after the decimal place, it can\
Try decimal instead of double. It can't store numbers as big as double, but I think it's got higher precision after the decimal. If you need more, you'll probably have to use a String.