✔ 最佳答案
To calculate pi, it is not talking about which compiler to use, but the method itself
To calculate pi to 1,000,000,000 digits, there are two ways:
1) implement a BigDouble class. Unfortunately, there is no such a "BigInteger" or "BigDouble" class in C/C++ (but did exist in Java), and the double/long double itself only correct to 7 to 16 digits only. To calculate pi up to such high accuracy, you must have a way to store that 1,000, 000, 000 digits
2) calculate pi one digits by one digits. There exists formula called "BBP formula" that can calculate one digits at one times. For each terms in this formula, it represents one digits in pi, but in base-16. you have to convert back to base-10.
Ref. have many formula that can calculate digits of pi.