Boost logo

Boost :

From: Jeff Garland (jeff_at_[hidden])
Date: 2002-09-04 12:45:39


> >Jeff Garland:
> >>
> >> ... for the most part I'm not to worried about
> >> interoperation of decimals with different scales.
> >>
> >
> >Interest rates and currency.
>
> I wrote some accounting software once for a petroleum distributor. Price
> (dollars per gallon, 4 places) times quantity (in gallons, 1 place) yielded
> invoice amount (in dollars, 2 places).

Sure, but you could do all of this using 4 places and then round off to
two with the final result. This would at most require a couple of conversion
operations which I was arguing might be handled by an explicit user cast
instead of providing overloaded operators for every possible combination.
Of course, the operator set might still be possible to do with a single
set of template functions.

 
Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk