Boost logo

Boost :

From: Bill Seymour (bill-at-the-office_at_[hidden])
Date: 2003-07-15 14:39:09


I've upload fixdec23.zip to the Yahoo files section.

I made some changes that Jens suggested to allow compiling with
Comeau and gcc; and I've made the is_bounded and is_modulo fixes
that Fernando suggested along with interoperatability with
unsigned as well as int.

Fernando,

I think that max_scale needs to be a constant expression
because it's used in the definition of numeric_limits<decimal>:

  BOOST_STATIC_CONSTANT(int, digits=boost::fixdec::max_scale);
  BOOST_STATIC_CONSTANT(int, digits10=boost::fixdec::max_scale);

And I think I'm right about numeric_limits<>::digits10. I believe
it's intended to be mean that, if the value is N, then /all/ N-digit
numbers can be represented. numeric_limits<decimal>::digits10 can't
be 19 because only a subset of 19-digit numbers are representable.

Also, I think that your statement:
>
> ... __int64 support 18 digits at most.
>
is factually incorrect. Your implementation's __int64 should support
anything up to 10**63 - 1 or (with commas as thousands separators)
9,223,372,036,854,775,807. That's a 19-digit number.

--Bill Seymour


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