On 04/11/2009, at 1:29 AM, Graham Cox wrote:
NSDecimal may help, but it's also of finite size, so it won't help trying to print out the digits of pi to arbitrary precision, since pi is infinitely long. Algorithms to print the digits of pi usually emit the digits one at a time, so they are not storing the whole value as a single number. You'll probably need to resort to this sort of approach if you're just trying to calculate pi. To use the resulting value of pi in a calculation is going to be very difficult, and probably serves no practical purpose.


You could also try using code like this, which should be fairly easy to port to Mac:

http://www.tc.umn.edu/~ringx004/mapm-main.html

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to