Skip to main content

alphaWorks  >  Forums  >  decNumber++  >  developerWorks

<declimits> errors and a patch    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]

Posts: 3
Registered: Jan 23, 2007 10:50:03 AM
<declimits> errors and a patch
Posted: Jan 30, 2007 10:31:02 AM
Click to report abuse...   Click to reply to this thread Reply
There are some errors (or perhaps IBM C++-isms) in the supplied <declimits> header. A patch is below:

code
      • declimits 2006-07-09 18:34:40.000000000 -0400
+ ../decNumber++/include/declimits 2007-01-30 10:28:25.541988000 -0500
@@ -22,8 +22,7 @@

namespace std {
template
  • class numeric_limits<decimal::decimal32>
  • : public _Num_float_base {
+ class numeric_limits<decimal::decimal32> {
public:
static const bool is_specialized = true;
static decimal::decimal32 min() throw()
@@ -40,7 +39,7 @@
static decimal::decimal32 epsilon() throw()
{ return DEC32_EPSILON; }
static decimal::decimal32 round_error() throw()
  • { return decimal::decimal32(5ULL, -1); }
+ { return decimal::make_decimal32(5ULL, -1); }

static const int min_exponent = DEC32_MIN_EXP;
static const int min_exponent10 = min_exponent;
@@ -72,8 +71,7 @@
};

template
  • class numeric_limits<decimal::decimal64>
  • : public _Num_float_base {
+ class numeric_limits<decimal::decimal64> {
public:
static const bool is_specialized = true;
static decimal::decimal64 min() throw()
@@ -90,7 +88,7 @@
static decimal::decimal64 epsilon() throw()
{ return DEC64_EPSILON; }
static decimal::decimal64 round_error() throw()
  • { return decimal::decimal64(5ULL, -1); }
+ { return decimal::make_decimal64(5ULL, -1); }

static const int min_exponent = DEC64_MIN_EXP;
static const int min_exponent10 = min_exponent;
@@ -122,8 +120,7 @@
};

template
  • class numeric_limits<decimal::decimal128>
  • : public _Num_float_base {
+ class numeric_limits<decimal::decimal128> {
public:
static const bool is_specialized = true;
static decimal::decimal128 min() throw()
@@ -140,7 +137,7 @@
static decimal::decimal128 epsilon() throw()
{ return DEC128_EPSILON; }
static decimal::decimal128 round_error() throw()
  • { return decimal::decimal128(5ULL, -1); }
+ { return decimal::make_decimal128(5ULL, -1); }

static const int min_exponent = DEC128_MIN_EXP;
static const int min_exponent10 = min_exponent;

[/code]

Point your RSS reader here for a feed of the latest messages in all forums