Re: BigDecimal, scale, and prototypes
Re: BigDecimal, scale, and prototypes
- Subject: Re: BigDecimal, scale, and prototypes
- From: Chuck Hill <email@hidden>
- Date: Fri, 15 Aug 2008 11:24:09 -0700
On Aug 15, 2008, at 11:07 AM, Florijan Stamenkovic wrote:
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?
<checks calendar>
You are worrying about a few bits in 2008???
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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