Boost logo

Boost :

From: Keith Burton (kb_at_[hidden])
Date: 2003-07-19 02:16:23

On the question of scale as part of the type :

My experience with my own libraries ( i.e. several iterations ) is that
        a) scale ( and precision ) is required as part of the type
        b) a common base for decimals which allows forwarding is
        c) a common base for decimals which allows some read-only
functions especially output is desirable

But my libraries used a format where the scale and precision were part
of the ( base ) data as well as part of the type.
They are not a candidate for Boost as they are written in assembler.

On the question of scale of intermediate results :
        To make decimals useful then some built-in support for
maintaining the precision of intermediate result is vital. I used
multiply and divide functions that only returned a very high precision
result which was then rounded on the final assignment. This , at least ,
allowed currency conversions to be implemented with the precision
mandated by some Euporean countries without taking special measures in
the user source.

With apologies for not having time to review the decimal library

Keith Burton

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