• 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
Re: 64 bit
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: 64 bit (From: email@hidden)

  • Prev by Date: Re: documentation window and "Previous"
  • Next by Date: Re: Loading function from a bundle without loading all globals.
  • Previous by thread: Re: 64 bit
  • Next by thread: Re: 64 bit
  • Index(es):
    • Date
    • Thread