Boost logo

Boost :

From: Dirk Schreib (Dirk.Schreib_at_[hidden])
Date: 2003-02-14 13:56:20


Hello Boost,

I looked around (not only at boost) and found no "suitable"
C++ class for decimal floating points.

What I mean with "suitable" is best described with the
background from the excellent web pages at
http://www2.hursley.ibm.com/decimal/ .

Similiar to the Decimal8 encoding, I need:

- Exact representation of decimal fractions (e.g 1/10)
- at least 16 significant digits
- exponent ranging from at least -30 to +30 (meaning 10^x)
- as fast as possible
- Portable at least to MSVC++6/7.1, SUNcc, gcc (sparc, intel)

I like the proposed specification of the IEEE 754r committee,
but this representation seems to prefer hardware support and
is to slow if coded in software only.

All the classes around with an unlimited number of digits are to slow too.

So we started to code our own class based on a 64 bit integer type
with 8 exponent bits and 56 bits for the mantissa. But I don't
want to reinvent the wheel. Is there someone who has done the same?
Or is there enough interest here to do a joint development?

Ciao
  Dirk


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