Re: Handling calculations with many decimal places

2009-11-03 Thread Ian Piper
On 3 Nov 2009, at 21:22, Greg Guerin wrote: Ian Piper wrote: I want to be able to display potentially a large number of decimal places in the result (hundreds at least). Explanation and many links to libs: http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic Any lib written in C or

Re: Handling calculations with many decimal places

2009-11-03 Thread Greg Guerin
Ian Piper wrote: I want to be able to display potentially a large number of decimal places in the result (hundreds at least). Explanation and many links to libs: http://en.wikipedia.org/wiki/Arbitrary-precision_arithmetic Any lib written in C or with C bindings would work in Objective-C.

Re : Handling calculations with many decimal places

2009-11-03 Thread Peter Hudson
You may find using binary coded decimal is a useful. If you google for binary coded decimal library for osx you get a number of libraries. I thought this one was interesting. http://mac.softpedia.com/get/Development/Libraries/libpbcd.shtml Peter __

Re: Handling calculations with many decimal places

2009-11-03 Thread Quincey Morris
On Nov 3, 2009, at 06:18, Ian Piper wrote: 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 i

Re: Handling calculations with many decimal places

2009-11-03 Thread Graham Cox
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 n

Re: Handling calculations with many decimal places

2009-11-03 Thread Graham Cox
On 04/11/2009, at 1:18 AM, Ian Piper wrote: 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

Handling calculations with many decimal places

2009-11-03 Thread Ian Piper
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 fi