Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-05-10 14:41:01

At 01:43 PM 5/10/2001, Ken shaw wrote:

>After looking over the interface that was uploaded and thinking about
>trying to use this for any sort of serious app, I think that templating
>the maximum number of decimal places is probably not an ideal solution.
>I suggest an implementation where there is not a maximum precision. If
>a calculation would increase or decrease the number of decimal places
>stored as needed.

While it has been a long time since I did any business or accounting
programming, my memory is that we always wanted to have control of the
precision. That is why we used fixed-point decimal types, rather than
integer or floating point types.

>This implementation would have wider usability than just a currency
>It might be possible to implement various scientific calculations using
>and natural logarithms and other irrational numbers to whatever precision
>was desired for the calculation. Yes this would give up the hard won
>and efficiency of the fpu. But isn't the fact that a double cannot
>accurately represent a 64bit integer a sign that a true full precision
>number might be useful?

IMO the focus should be on the presumed application domain of business and
accounting. If it turns out to have wider applicability, well that is
fine. But it really doesn't seem very likely that many scientific or
numerics folks would use a such a type.


Boost list run by bdawes at, gregod at, cpdaniel at, john at