Re: "banker's rounding"
- From: Tim Baur <trbo20@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 Mar 2005 13:23:29 -0800
The following is from:
http://www.theserverside.com/patterns/thread.tss?thread_id=28063
* * * * * * *
Bankers actually use rounding schems that not only reduce precision but
also reduce accuracy. These methods are used to keep small amounts of
money from being lost or created incorrectly. It doesn't make sense for
monetary calculations to be stored as fractions.
For example. Let's say a dollar is split between three accounts. So
using your methodology, you add 1/3 of a dollar to each one and leave it
that way to determine precision later. Eventually that value has to be
converted to a decimal because there is no such thing as a third of a
dollar. So what is put in each account? $0.3333? $0.0001 just
disappeared into the ether. 0.3334? $0.0002 was just created out of thin
air. You cannot coordinate to give one account the extra $0.0001 because
you left it for later. Unless you create some compicated database of
where fractions came from and where their conterparts are allocated,
keeping the values as fractions will cause errors.
* * * * * * *
I believe in Superman III, Richard Prior's character exploited this
rounding error to embezzle money from his employer to build a super evil
computer.
Bob O`Bob <filterbob@xxxxxxxxxxxxxxx> wrote in
news:#57C6mWNFHA.2748@xxxxxxxxxxxxxxxxxxxx:
> Does anyone here even know of someone who actually prefers VB to do
> "Banker's Rounding" ?
>
> I'm sure it's possible.
> Maybe even common.
> I'm just curious how probable.
>
>
>
> Bob
.
- References:
- "banker's rounding"
- From: Bob O`Bob
- "banker's rounding"
- Prev by Date: Re: "banker's rounding"
- Next by Date: Re: "banker's rounding"
- Previous by thread: Re: "banker's rounding"
- Next by thread: Re: "banker's rounding"
- Index(es):
Relevant Pages
|