Boost logo

Boost :

From: John Max Skaller (skaller_at_[hidden])
Date: 2001-05-10 18:03:10


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.

        To which problem?

> 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.

        It is possible to implement this, indeed, many math packages do,
to support 'error' calculations for scientific data. However,
it is highly problematic, and it serves a different purpose than
the proposed decimal class. That class intends solely to use
'long int' to do fixed point calculations, and use the type system
to keep track of where the decimal point is.

        That is, the class will be attractive because it is both
safe and blindingly fast. It should also, IMHO, be simple,
and do very little implicitly, so that one can be confident
it is being used correctly and efficiently by code inspection.

-- 
John (Max) Skaller, mailto:skaller_at_[hidden]
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
checkout Vyper http://Vyper.sourceforge.net
download Interscript http://Interscript.sourceforge.net

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