Re: 64 bit
Re: 64 bit
- Subject: Re: 64 bit
- From: John Engelhart <email@hidden>
- Date: Fri, 14 Dec 2007 00:13:21 -0500
On Dec 13, 2007, at 7:04 PM, email@hidden wrote:
aaah see what you meant, my fault, was hoping you meant there was
also an extension to the standard 'double', the thing is that
the 53 bits precision or so is not enough, we need more accuracy
dealing with money and amounts, we were using doubles for small
figures, but this has to stop because we are getting more users
(with more requirements)
If you are dealing with monetary values, you almost certainly should
not be using base-2 arithmetic. See http://www2.hursley.ibm.com/decimal/
and http://www2.hursley.ibm.com/decimal/decifaq1.html for more
information.
Using Cocoa, you can use the NSDecimalNumber class: http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSDecimalNumber_Class/Reference/Reference.html
If something more portable is your cup of tea, you can use a library
such as decNumber: http://www.alphaworks.ibm.com/tech/decNumber
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden