Today I got my city utility bill for water/sewage and "solid waste"
(which used to be called garbage).

Glancing at the rates and totals, I remembered a thread from some
while back - turns out it's coming up on nine years ago.

I am charged for one (1) Large Garbage Bin for 125 days at a rate of
$1.220657534/day for a total of $152.58 .
And one (1) Oversized Item Fee for the same 125 days at
$0.054109589/day for a total of $6.76 .

Obviously(?) both totals have been rounded down (or perhaps, to nearest).

One imagines they came up with the notional daily rates by starting
with the yearly ones, rather than from some first principals or daily
costs. But who knows...

Still, there are nine (9) significant digits to those rates - beats
Cowlishaw's 5-digit tax rates on a phone call.Try that in binary FP.
For that matter, try calculating the total bill across the city using
traditional packed decimal.

Tony H

On Fri, 26 Apr 2013 at 16:28, Tony Harminc <[email protected]> wrote:
> On 25 April 2013 17:59, Frank Swarbrick <[email protected]> wrote:
>
> > It's still not clear to me the situations when a business programmer would 
> > want an explicit field to be DFP instead of PD.  Perhaps someone can give a 
> > good example of such?
>
> If you must deal with very large and very small numbers in the same
> calculation it becomes difficult to use fixed point arithmetic.
> Cowlishaw's canonical example is that of telephone call billing, where
> calls might be priced (and federal/state/local tax calculated) on a
> per second basis with tax values to six digits, but a day's or month's
> worth of total billing for a city or state could easily be in the
> millions. Of course for display purposes these are all eventually
> rounded, but that can't be done during the calculation without risk of
> losing a lot in the total.
>
> His FAQ at http://speleotrove.com/decimal/decifaq.html has many good
> (and a few implausible) examples. That page is mostly geared toward
> the need for decimal floating point vs binary floating point, rather
> than decimal fixed point, but is still the best reference around.
>
> Tony H.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to