>>Just define it manually. Nobody except for a very limited few cases needs more than, say, the first 25-30 digits of PI anyway.
I've actually memorized PI to about the 36'th digit or so, but where possible I prefer to not to rely on limited precision like that (whether the added precision is needed or not). And to hardcode 1000+ digits would add another 1kb to my source file, and if Joe Shmo decides to modify one digit then it's all off Problem with 22/7 is that while it's possibly very precise, it's certainly not accurate.

Sang-Drax: After googling on M_PI (much more successful than PI C++ standard cmath ), I came to the same conclusion (everywhere said it was nonstandard).
>>What would be the advantage of using the atan2 function and a multiplication to calculate pi?
I'm not sure if there is one. Possibly the algorithm for finding acos is less accurate/precise than for atan? Anyway, the *4 multiplication would mean a potential loss of (I think) a digit or two of accuracy. I also noticed that in Visual Basic there's no acos/asin functions, you must calculate them by using atn (atan) and manipulating the result. Does anyone know more about this?