• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Handling calculations with many decimal places
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Handling calculations with many decimal places


  • Subject: Handling calculations with many decimal places
  • From: Ian Piper <email@hidden>
  • Date: Tue, 03 Nov 2009 14:18:07 +0000

Hi,

I am writing an implementation of the Brent-Salamin algorithm for calculating pi. I want to be able to display potentially a large number of decimal places in the result (hundreds at least). However I am finding that even using long double values in my calculation gives me only the first 50 or so decimal places. Is this a limitation of long double that I am running into here?

Should I be using NSDecimal instead to do this kind of calculation? If so, can anyone point me at a good example of its use as I am struggling with how to use it?

Thanks,


Ian. -- _______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Handling calculations with many decimal places
      • From: Quincey Morris <email@hidden>
    • Re: Handling calculations with many decimal places
      • From: Graham Cox <email@hidden>
  • Prev by Date: Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...
  • Next by Date: Re: Handling calculations with many decimal places
  • Previous by thread: Re: Overriding -[UIViewController loadView], and loading from a nib
  • Next by thread: Re: Handling calculations with many decimal places
  • Index(es):
    • Date
    • Thread