Historical Note

This page was migrated from the original p-nand-q.com site which was last updated in 2015. The content has been preserved exactly as it was, with only formatting updated for modern browsers. Over the coming days and weeks, the content will be reviewed and may be updated for accuracy and relevance. If you find any issues, please contact me.

Calculating pi to an arbitrary number of digits

Obfuscated Objective-C? Although some have said it couldn't be done, notable security experts viaforensics have pointed out that Obfuscated Objective-C is actually a good practice.. Being bored with your everyday, run of the mill type of Objective-C with all its pesky readbility, I decided to try my hands at an old favourite of mine: Calculating Pi to an arbitary number of digits.

And here are the results:

For your reference: I have versions in C#, C/C++, Java and Python as well.

All in plain, well-documented Objective-C. You can download the whole set of files including the XCode project here. If you are bored, I invite you to read the code and learn to appreciate that there is nothing too hard for a dedicated code obfuscator. Enjoy!