• 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: BigDecimal, scale, and prototypes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BigDecimal, scale, and prototypes


  • Subject: Re: BigDecimal, scale, and prototypes
  • From: Florijan Stamenkovic <email@hidden>
  • Date: Fri, 15 Aug 2008 14:07:24 -0400


On Aug 15, 2008, at 12:00, David Avendasora wrote:

How currency-centric of you. If you are selling widgets that are really small, or you have a very strong currency, you may want to keep track of a cost that is < .01 for calculations, even if the value presented to the customer ends up getting rounded to 2 decimal points. With some currencies you don't even need decimal points. Colombian Peso, USD, etc.

I guess that's a good point, increasing the scale when things are being calculated, reducing it when it is being displayed.


However, I am not sure I should actually store the extra precision. In our situation, we would store the value in some currency *as it is on the invoice*, and then at runtime possibly calculate it into other currencies, but would not store the result. So, unless there are currencies that per se require more then 2 precision digits, we gain nothing by extra precision on the db layer. See my point?

F
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: BigDecimal, scale, and prototypes
      • From: David Avendasora <email@hidden>
    • Re: BigDecimal, scale, and prototypes
      • From: Chuck Hill <email@hidden>
References: 
 >BigDecimal, scale, and prototypes (From: Florijan Stamenkovic <email@hidden>)
 >Re: BigDecimal, scale, and prototypes (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: sequential numbering across more instances
  • Next by Date: Re: BigDecimal, scale, and prototypes
  • Previous by thread: Re: BigDecimal, scale, and prototypes
  • Next by thread: Re: BigDecimal, scale, and prototypes
  • Index(es):
    • Date
    • Thread