[JSR-currency] Re: Important use case regarding rounding
- From: Ben Evans <benjamin.john.evans@...>
- To: jcurrency_mail@...
- Subject: [JSR-currency] Re: Important use case regarding rounding
- Date: Thu, 3 Jan 2013 11:23:34 +0000
I've made this point before, but I really feel that without use cases,
there is the potential for us to waste vast amounts of time on
I would much prefer all technical work to stop, whilst the EG defines
more clearly what it is trying to achieve, who the users are, and what
their use cases are. It seems to me that starting implementation work,
and in particular choosing an internal representation in advance of
specifying these requirements is a big mistake.
But the EG has heard these complaints from me before, and I'm starting
to sound like a stuck record, so I'll shut up again. :)
On Sun, Dec 30, 2012 at 12:36 AM, Victor Grazi <vgrazi@...> wrote:
> Hi All
> I just noticed an edge case in our development code we had discussed before,
> but somehow the importance just hit home.
> If you use BigDecimal with say 2 decimal rounding, then 100/3 = 33.33.
> However 33.33 x 3 = 99.99. Lost a penny.
> I think it would really be great if the Money class handled this, by
> allowing the user to specify a compound rule for rounding down except one
> out of 3 would round up, so it would be 33.33+33.33+33.34.
> Not sure how that would be conceived, but it's something to think about.