Re: Double: 2 Decimal points
- From: "Rvde" <wheneveriusemyrealemail@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 1 Aug 2005 00:21:57 +0200
"tex" <NoSpam@xxxxxxxxxxx> wrote in message
news:OgTFe.9423$dU3.341@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Just for what it's worth:
>
> Some year ago I took the trouble of finding some examples, and
> IBM's mainframe floating point encoding technique did not hold
> 0.10, so, say adding 100 dimes give you $9.99 (of course rounding
> would take care of it, but not if you added enough of it, say for a
> bank with 10s or 100s of thousands of customers, and large numbers
> of transactions.
>
> Today computers, including IBM mainframes I believe, use IEEE
> floating point, and I have not bothered to find some examples, but
> it is still true that not all decimals are represented by floating
> point
> vars.
Slightly off topic, but on mainframes financial applications tend to
use fixed point decimals. This does avoid the rounding errors in
adding and subtracting, but you pay for it by having a worse rounding
error with multiplication and division, so as far as I know it is not
a rational choice, just a traditional one.
.
- Follow-Ups:
- Re: Double: 2 Decimal points
- From: tex
- Re: Double: 2 Decimal points
- Prev by Date: Re: what is assertion in java?
- Next by Date: Re: Double: 2 Decimal points
- Previous by thread: Re: what is assertion in java?
- Next by thread: Re: Double: 2 Decimal points
- Index(es):
Relevant Pages
|