Boost logo

Boost :

From: p_michel_andre (michel.andre_at_[hidden])
Date: 2002-03-07 10:08:41


--- In boost_at_y..., Bill Seymour <bill-at-the-office_at_p...> wrote:
> I'm working on that. I submitted an idea for an interface
> to Boost shortly before the last J16/WG21 meeting. I haven't
> had a lot of time to work on it lately; but I hope to have
> a new version to submit next week.

Great!

> I don't use BCD. Internally, it's a couple of integer values.
> One is the representation of unity (a constant that's always
> an integral power of 10); and the other is an integral number
> of "units in the last place" (ULPs). The internal integer
> type is int_least64_t if the C++ implementation has one;
> otherwise it's just long, and not really suitable for
> "high finance."

Now I'm stupid. I don't really understand the representation and
accuracy and range you get with it. Or have I missed something.

> What I'm concerned most with is creating an interface that
> would be suitable for standardization. I'm less concerned
> with making a library that's maximally useful on current
> boxes;

Yes I understand that.

> but if you'd like to work on the library and create
> a BCD representation, I'd be happy for us to work together.
> Keep in mind that this really needs to be a light-weight
> class...it's an arithmetic type and so will likely be
> copied by value a lot.

I'd be more than happy to work with you. There is also some
algorithms to pack BCD.

My thougth was to have an integer template argument specifiying the
inline buffer (or how many digits the number would represent). My
first thought was to use BCD (or some kind of BCD) internally since
my guess was that there exists algorithms working on BCD. It would be
nice to handle arbitrary length (specified at compile time) decimals
that doesn't suffer from the problems that floats and doubles do. And
would be useful for finance and accounting.

> Maybe I can upload just the documentation later today
> or tomorrow. I'm not ready to show anybody the code
> yet...

That would be interesting to look at.

>I don't want folks to know how stupid I am. 8-)

Well I'm a masochist and like to make a fool of myself in public ;).

Yours
/Michel


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