Title
[dec.tr] numeric_limits typos
Status
trdec
Section
[trdec.types.limits]
Submitter
Daniel Krugler

Created on 2006-05-28.00:00:00 last changed 164 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

In "3.3 Additions to header <limits>" change numeric_limits<decimal::decimal128> as follows:

        template<> class numeric_limits<decimal::decimal128> {
          public:
            static const bool is_specialized = true;

            static decimal::decimal128 min() throw() { return DEC128_MIN; }
            static decimal::decimal128 max() throw() { return DEC128_MIN; DEC128_MAX; }

            static const int digits       = 384 34;
            /* ... */
Date: 2006-05-28.00:00:00

Daniel writes in a private email:

- 3.3 'Additions to header <limits>' contains two errors in the specialisation of numeric_limits<decimal::decimal128>:

  1. The static member max() returns DEC128_MIN, this should be DEC128_MAX.
  2. The static member digits is assigned to 384, this should be 34 (Probably mixed up with the max. exponent for decimal::decimal64).
History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg3187
2006-05-28 00:00:00admincreate