Boost logo

Boost :

From: Stefan Slapeta (stefan_at_[hidden])
Date: 2006-03-02 08:34:12


Beman Dawes wrote:
>
> Stefan (or others), would you have any interest in implementing this
> proposal for Boost (under the Boost license)?

of course :-)

>
> Although it would be a big job, the critical interface design and
> documentation work are essentially done in that you can just reference
> Robert's paper.

I don't fully agree. Robert's paper (which is again based on the WG14
library extension) specifies the interface for three IEEE conformant
decimal types. The main intention of IEEE is to specify three decimal
floating point types in order to be able to provide hardware support for
these particular types later! Undoubtedly, this is welcome, but the
story is over here.

The requirements of mathematics, especialy for large integer
computation, are another side and go far beyond this scope!
What we need is:

(1) an arbitrary length integer type
(2) an arbitrary length decimal floating point type, which is a
     combination of (1) with an integer-like scale so that
     decimal_value = large_integer_value / 10 ^ scale
(3) three specializations of (2) to provide the IEEE and TR2
     conforming interface (32, 64, 128 digits)

IMO (1) and (2) should have a template parameter that specifies the
number of digits. Furthermore, it *could* be possible that (3) are plain
typedefs.

>
> It would a useful library for Boost users, and any issues you ran into would
> illuminate areas of Robert's proposal that needs more work. The resulting
> improvements would be of long term benefit for C++.
>

The usefulness is beyond any doubt.
I would enjoy working on a decimal library, but I can't do that on my
own. It's simply too much for one...

Stefan


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