libstdc++
|
00001 // <decimal> -*- C++ -*- 00002 00003 // Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. 00004 // This file is part of the GNU ISO C++ Library. This library is free 00005 // software; you can redistribute it and/or modify it under the 00006 // terms of the GNU General Public License as published by the 00007 // Free Software Foundation; either version 3, or (at your option) 00008 // any later version. 00009 00010 // This library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 00015 // Under Section 7 of GPL version 3, you are granted additional 00016 // permissions described in the GCC Runtime Library Exception, version 00017 // 3.1, as published by the Free Software Foundation. 00018 00019 // You should have received a copy of the GNU General Public License and 00020 // a copy of the GCC Runtime Library Exception along with this program; 00021 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 00022 // <http://www.gnu.org/licenses/>. 00023 00024 /** @file decimal/decimal 00025 * This is a Standard C++ Library header. 00026 */ 00027 00028 // ISO/IEC TR 24733 00029 // Written by Janis Johnson <janis187@us.ibm.com> 00030 00031 #ifndef _GLIBCXX_DECIMAL 00032 #define _GLIBCXX_DECIMAL 1 00033 00034 #pragma GCC system_header 00035 00036 #include <bits/c++config.h> 00037 00038 #ifndef _GLIBCXX_USE_DECIMAL_FLOAT 00039 #error This file requires compiler and library support for ISO/IEC TR 24733 \ 00040 that is currently not available. 00041 #endif 00042 00043 namespace std _GLIBCXX_VISIBILITY(default) 00044 { 00045 /** 00046 * @defgroup decimal Decimal Floating-Point Arithmetic 00047 * @ingroup numerics 00048 * 00049 * Classes and functions for decimal floating-point arithmetic. 00050 * @{ 00051 */ 00052 00053 /** @namespace std::decimal 00054 * @brief ISO/IEC TR 24733 Decimal floating-point arithmetic. 00055 */ 00056 namespace decimal 00057 { 00058 _GLIBCXX_BEGIN_NAMESPACE_VERSION 00059 00060 class decimal32; 00061 class decimal64; 00062 class decimal128; 00063 00064 // 3.2.5 Initialization from coefficient and exponent. 00065 static decimal32 make_decimal32(long long __coeff, int __exp); 00066 static decimal32 make_decimal32(unsigned long long __coeff, int __exp); 00067 static decimal64 make_decimal64(long long __coeff, int __exp); 00068 static decimal64 make_decimal64(unsigned long long __coeff, int __exp); 00069 static decimal128 make_decimal128(long long __coeff, int __exp); 00070 static decimal128 make_decimal128(unsigned long long __coeff, int __exp); 00071 00072 /// Non-conforming extension: Conversion to integral type. 00073 long long decimal32_to_long_long(decimal32 __d); 00074 long long decimal64_to_long_long(decimal64 __d); 00075 long long decimal128_to_long_long(decimal128 __d); 00076 long long decimal_to_long_long(decimal32 __d); 00077 long long decimal_to_long_long(decimal64 __d); 00078 long long decimal_to_long_long(decimal128 __d); 00079 00080 // 3.2.6 Conversion to generic floating-point type. 00081 float decimal32_to_float(decimal32 __d); 00082 float decimal64_to_float(decimal64 __d); 00083 float decimal128_to_float(decimal128 __d); 00084 float decimal_to_float(decimal32 __d); 00085 float decimal_to_float(decimal64 __d); 00086 float decimal_to_float(decimal128 __d); 00087 00088 double decimal32_to_double(decimal32 __d); 00089 double decimal64_to_double(decimal64 __d); 00090 double decimal128_to_double(decimal128 __d); 00091 double decimal_to_double(decimal32 __d); 00092 double decimal_to_double(decimal64 __d); 00093 double decimal_to_double(decimal128 __d); 00094 00095 long double decimal32_to_long_double(decimal32 __d); 00096 long double decimal64_to_long_double(decimal64 __d); 00097 long double decimal128_to_long_double(decimal128 __d); 00098 long double decimal_to_long_double(decimal32 __d); 00099 long double decimal_to_long_double(decimal64 __d); 00100 long double decimal_to_long_double(decimal128 __d); 00101 00102 // 3.2.7 Unary arithmetic operators. 00103 decimal32 operator+(decimal32 __rhs); 00104 decimal64 operator+(decimal64 __rhs); 00105 decimal128 operator+(decimal128 __rhs); 00106 decimal32 operator-(decimal32 __rhs); 00107 decimal64 operator-(decimal64 __rhs); 00108 decimal128 operator-(decimal128 __rhs); 00109 00110 // 3.2.8 Binary arithmetic operators. 00111 #define _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(_Op, _T1, _T2, _T3) \ 00112 _T1 operator _Op(_T2 __lhs, _T3 __rhs); 00113 #define _DECLARE_DECIMAL_BINARY_OP_WITH_INT(_Op, _Tp) \ 00114 _Tp operator _Op(_Tp __lhs, int __rhs); \ 00115 _Tp operator _Op(_Tp __lhs, unsigned int __rhs); \ 00116 _Tp operator _Op(_Tp __lhs, long __rhs); \ 00117 _Tp operator _Op(_Tp __lhs, unsigned long __rhs); \ 00118 _Tp operator _Op(_Tp __lhs, long long __rhs); \ 00119 _Tp operator _Op(_Tp __lhs, unsigned long long __rhs); \ 00120 _Tp operator _Op(int __lhs, _Tp __rhs); \ 00121 _Tp operator _Op(unsigned int __lhs, _Tp __rhs); \ 00122 _Tp operator _Op(long __lhs, _Tp __rhs); \ 00123 _Tp operator _Op(unsigned long __lhs, _Tp __rhs); \ 00124 _Tp operator _Op(long long __lhs, _Tp __rhs); \ 00125 _Tp operator _Op(unsigned long long __lhs, _Tp __rhs); 00126 00127 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal32, decimal32, decimal32) 00128 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(+, decimal32) 00129 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal32, decimal64) 00130 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal64, decimal32) 00131 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal64, decimal64, decimal64) 00132 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(+, decimal64) 00133 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal32, decimal128) 00134 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal64, decimal128) 00135 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal32) 00136 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal64) 00137 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(+, decimal128, decimal128, decimal128) 00138 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(+, decimal128) 00139 00140 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal32, decimal32, decimal32) 00141 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(-, decimal32) 00142 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal32, decimal64) 00143 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal64, decimal32) 00144 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal64, decimal64, decimal64) 00145 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(-, decimal64) 00146 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal32, decimal128) 00147 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal64, decimal128) 00148 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal32) 00149 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal64) 00150 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(-, decimal128, decimal128, decimal128) 00151 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(-, decimal128) 00152 00153 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal32, decimal32, decimal32) 00154 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(*, decimal32) 00155 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal32, decimal64) 00156 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal64, decimal32) 00157 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal64, decimal64, decimal64) 00158 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(*, decimal64) 00159 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal32, decimal128) 00160 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal64, decimal128) 00161 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal32) 00162 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal64) 00163 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(*, decimal128, decimal128, decimal128) 00164 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(*, decimal128) 00165 00166 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal32, decimal32, decimal32) 00167 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(/, decimal32) 00168 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal32, decimal64) 00169 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal64, decimal32) 00170 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal64, decimal64, decimal64) 00171 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(/, decimal64) 00172 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal32, decimal128) 00173 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal64, decimal128) 00174 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal32) 00175 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal64) 00176 _DECLARE_DECIMAL_BINARY_OP_WITH_DEC(/, decimal128, decimal128, decimal128) 00177 _DECLARE_DECIMAL_BINARY_OP_WITH_INT(/, decimal128) 00178 00179 #undef _DECLARE_DECIMAL_BINARY_OP_WITH_DEC 00180 #undef _DECLARE_DECIMAL_BINARY_OP_WITH_INT 00181 00182 // 3.2.9 Comparison operators. 00183 #define _DECLARE_DECIMAL_COMPARISON(_Op, _Tp) \ 00184 bool operator _Op(_Tp __lhs, decimal32 __rhs); \ 00185 bool operator _Op(_Tp __lhs, decimal64 __rhs); \ 00186 bool operator _Op(_Tp __lhs, decimal128 __rhs); \ 00187 bool operator _Op(_Tp __lhs, int __rhs); \ 00188 bool operator _Op(_Tp __lhs, unsigned int __rhs); \ 00189 bool operator _Op(_Tp __lhs, long __rhs); \ 00190 bool operator _Op(_Tp __lhs, unsigned long __rhs); \ 00191 bool operator _Op(_Tp __lhs, long long __rhs); \ 00192 bool operator _Op(_Tp __lhs, unsigned long long __rhs); \ 00193 bool operator _Op(int __lhs, _Tp __rhs); \ 00194 bool operator _Op(unsigned int __lhs, _Tp __rhs); \ 00195 bool operator _Op(long __lhs, _Tp __rhs); \ 00196 bool operator _Op(unsigned long __lhs, _Tp __rhs); \ 00197 bool operator _Op(long long __lhs, _Tp __rhs); \ 00198 bool operator _Op(unsigned long long __lhs, _Tp __rhs); 00199 00200 _DECLARE_DECIMAL_COMPARISON(==, decimal32) 00201 _DECLARE_DECIMAL_COMPARISON(==, decimal64) 00202 _DECLARE_DECIMAL_COMPARISON(==, decimal128) 00203 00204 _DECLARE_DECIMAL_COMPARISON(!=, decimal32) 00205 _DECLARE_DECIMAL_COMPARISON(!=, decimal64) 00206 _DECLARE_DECIMAL_COMPARISON(!=, decimal128) 00207 00208 _DECLARE_DECIMAL_COMPARISON(<, decimal32) 00209 _DECLARE_DECIMAL_COMPARISON(<, decimal64) 00210 _DECLARE_DECIMAL_COMPARISON(<, decimal128) 00211 00212 _DECLARE_DECIMAL_COMPARISON(>=, decimal32) 00213 _DECLARE_DECIMAL_COMPARISON(>=, decimal64) 00214 _DECLARE_DECIMAL_COMPARISON(>=, decimal128) 00215 00216 _DECLARE_DECIMAL_COMPARISON(>, decimal32) 00217 _DECLARE_DECIMAL_COMPARISON(>, decimal64) 00218 _DECLARE_DECIMAL_COMPARISON(>, decimal128) 00219 00220 _DECLARE_DECIMAL_COMPARISON(>=, decimal32) 00221 _DECLARE_DECIMAL_COMPARISON(>=, decimal64) 00222 _DECLARE_DECIMAL_COMPARISON(>=, decimal128) 00223 00224 #undef _DECLARE_DECIMAL_COMPARISON 00225 00226 /// 3.2.2 Class decimal32. 00227 class decimal32 00228 { 00229 public: 00230 typedef float __decfloat32 __attribute__((mode(SD))); 00231 00232 // 3.2.2.2 Construct/copy/destroy. 00233 decimal32() : __val(0.e-101DF) {} 00234 00235 // 3.2.2.3 Conversion from floating-point type. 00236 explicit decimal32(decimal64 __d64); 00237 explicit decimal32(decimal128 __d128); 00238 explicit decimal32(float __r) : __val(__r) {} 00239 explicit decimal32(double __r) : __val(__r) {} 00240 explicit decimal32(long double __r) : __val(__r) {} 00241 00242 // 3.2.2.4 Conversion from integral type. 00243 decimal32(int __z) : __val(__z) {} 00244 decimal32(unsigned int __z) : __val(__z) {} 00245 decimal32(long __z) : __val(__z) {} 00246 decimal32(unsigned long __z) : __val(__z) {} 00247 decimal32(long long __z) : __val(__z) {} 00248 decimal32(unsigned long long __z) : __val(__z) {} 00249 00250 /// Conforming extension: Conversion from scalar decimal type. 00251 decimal32(__decfloat32 __z) : __val(__z) {} 00252 00253 // 3.2.2.5 Conversion to integral type. (DISABLED) 00254 //operator long long() const { return (long long)__val; } 00255 00256 // 3.2.2.6 Increment and decrement operators. 00257 decimal32& operator++() 00258 { 00259 __val += 1; 00260 return *this; 00261 } 00262 00263 decimal32 operator++(int) 00264 { 00265 decimal32 __tmp = *this; 00266 __val += 1; 00267 return __tmp; 00268 } 00269 00270 decimal32& operator--() 00271 { 00272 __val -= 1; 00273 return *this; 00274 } 00275 00276 decimal32 operator--(int) 00277 { 00278 decimal32 __tmp = *this; 00279 __val -= 1; 00280 return __tmp; 00281 } 00282 00283 // 3.2.2.7 Compound assignment. 00284 #define _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(_Op) \ 00285 decimal32& operator _Op(decimal32 __rhs); \ 00286 decimal32& operator _Op(decimal64 __rhs); \ 00287 decimal32& operator _Op(decimal128 __rhs); \ 00288 decimal32& operator _Op(int __rhs); \ 00289 decimal32& operator _Op(unsigned int __rhs); \ 00290 decimal32& operator _Op(long __rhs); \ 00291 decimal32& operator _Op(unsigned long __rhs); \ 00292 decimal32& operator _Op(long long __rhs); \ 00293 decimal32& operator _Op(unsigned long long __rhs); 00294 00295 _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(+=) 00296 _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(-=) 00297 _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(*=) 00298 _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT(/=) 00299 #undef _DECLARE_DECIMAL32_COMPOUND_ASSIGNMENT 00300 00301 private: 00302 __decfloat32 __val; 00303 00304 public: 00305 __decfloat32 __getval(void) { return __val; } 00306 void __setval(__decfloat32 __x) { __val = __x; } 00307 }; 00308 00309 /// 3.2.3 Class decimal64. 00310 class decimal64 00311 { 00312 public: 00313 typedef float __decfloat64 __attribute__((mode(DD))); 00314 00315 // 3.2.3.2 Construct/copy/destroy. 00316 decimal64() : __val(0.e-398dd) {} 00317 00318 // 3.2.3.3 Conversion from floating-point type. 00319 decimal64(decimal32 d32); 00320 explicit decimal64(decimal128 d128); 00321 explicit decimal64(float __r) : __val(__r) {} 00322 explicit decimal64(double __r) : __val(__r) {} 00323 explicit decimal64(long double __r) : __val(__r) {} 00324 00325 // 3.2.3.4 Conversion from integral type. 00326 decimal64(int __z) : __val(__z) {} 00327 decimal64(unsigned int __z) : __val(__z) {} 00328 decimal64(long __z) : __val(__z) {} 00329 decimal64(unsigned long __z) : __val(__z) {} 00330 decimal64(long long __z) : __val(__z) {} 00331 decimal64(unsigned long long __z) : __val(__z) {} 00332 00333 /// Conforming extension: Conversion from scalar decimal type. 00334 decimal64(__decfloat64 __z) : __val(__z) {} 00335 00336 // 3.2.3.5 Conversion to integral type. (DISABLED) 00337 //operator long long() const { return (long long)__val; } 00338 00339 // 3.2.3.6 Increment and decrement operators. 00340 decimal64& operator++() 00341 { 00342 __val += 1; 00343 return *this; 00344 } 00345 00346 decimal64 operator++(int) 00347 { 00348 decimal64 __tmp = *this; 00349 __val += 1; 00350 return __tmp; 00351 } 00352 00353 decimal64& operator--() 00354 { 00355 __val -= 1; 00356 return *this; 00357 } 00358 00359 decimal64 operator--(int) 00360 { 00361 decimal64 __tmp = *this; 00362 __val -= 1; 00363 return __tmp; 00364 } 00365 00366 // 3.2.3.7 Compound assignment. 00367 #define _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(_Op) \ 00368 decimal64& operator _Op(decimal32 __rhs); \ 00369 decimal64& operator _Op(decimal64 __rhs); \ 00370 decimal64& operator _Op(decimal128 __rhs); \ 00371 decimal64& operator _Op(int __rhs); \ 00372 decimal64& operator _Op(unsigned int __rhs); \ 00373 decimal64& operator _Op(long __rhs); \ 00374 decimal64& operator _Op(unsigned long __rhs); \ 00375 decimal64& operator _Op(long long __rhs); \ 00376 decimal64& operator _Op(unsigned long long __rhs); 00377 00378 _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(+=) 00379 _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(-=) 00380 _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(*=) 00381 _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT(/=) 00382 #undef _DECLARE_DECIMAL64_COMPOUND_ASSIGNMENT 00383 00384 private: 00385 __decfloat64 __val; 00386 00387 public: 00388 __decfloat64 __getval(void) { return __val; } 00389 void __setval(__decfloat64 __x) { __val = __x; } 00390 }; 00391 00392 /// 3.2.4 Class decimal128. 00393 class decimal128 00394 { 00395 public: 00396 typedef float __decfloat128 __attribute__((mode(TD))); 00397 00398 // 3.2.4.2 Construct/copy/destroy. 00399 decimal128() : __val(0.e-6176DL) {} 00400 00401 // 3.2.4.3 Conversion from floating-point type. 00402 decimal128(decimal32 d32); 00403 decimal128(decimal64 d64); 00404 explicit decimal128(float __r) : __val(__r) {} 00405 explicit decimal128(double __r) : __val(__r) {} 00406 explicit decimal128(long double __r) : __val(__r) {} 00407 00408 00409 // 3.2.4.4 Conversion from integral type. 00410 decimal128(int __z) : __val(__z) {} 00411 decimal128(unsigned int __z) : __val(__z) {} 00412 decimal128(long __z) : __val(__z) {} 00413 decimal128(unsigned long __z) : __val(__z) {} 00414 decimal128(long long __z) : __val(__z) {} 00415 decimal128(unsigned long long __z) : __val(__z) {} 00416 00417 /// Conforming extension: Conversion from scalar decimal type. 00418 decimal128(__decfloat128 __z) : __val(__z) {} 00419 00420 // 3.2.4.5 Conversion to integral type. (DISABLED) 00421 //operator long long() const { return (long long)__val; } 00422 00423 // 3.2.4.6 Increment and decrement operators. 00424 decimal128& operator++() 00425 { 00426 __val += 1; 00427 return *this; 00428 } 00429 00430 decimal128 operator++(int) 00431 { 00432 decimal128 __tmp = *this; 00433 __val += 1; 00434 return __tmp; 00435 } 00436 00437 decimal128& operator--() 00438 { 00439 __val -= 1; 00440 return *this; 00441 } 00442 00443 decimal128 operator--(int) 00444 { 00445 decimal128 __tmp = *this; 00446 __val -= 1; 00447 return __tmp; 00448 } 00449 00450 // 3.2.4.7 Compound assignment. 00451 #define _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(_Op) \ 00452 decimal128& operator _Op(decimal32 __rhs); \ 00453 decimal128& operator _Op(decimal64 __rhs); \ 00454 decimal128& operator _Op(decimal128 __rhs); \ 00455 decimal128& operator _Op(int __rhs); \ 00456 decimal128& operator _Op(unsigned int __rhs); \ 00457 decimal128& operator _Op(long __rhs); \ 00458 decimal128& operator _Op(unsigned long __rhs); \ 00459 decimal128& operator _Op(long long __rhs); \ 00460 decimal128& operator _Op(unsigned long long __rhs); 00461 00462 _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(+=) 00463 _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(-=) 00464 _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(*=) 00465 _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT(/=) 00466 #undef _DECLARE_DECIMAL128_COMPOUND_ASSIGNMENT 00467 00468 private: 00469 __decfloat128 __val; 00470 00471 public: 00472 __decfloat128 __getval(void) { return __val; } 00473 void __setval(__decfloat128 __x) { __val = __x; } 00474 }; 00475 00476 #define _GLIBCXX_USE_DECIMAL_ 1 00477 00478 _GLIBCXX_END_NAMESPACE_VERSION 00479 } // namespace decimal 00480 // @} group decimal 00481 } // namespace std 00482 00483 #include <decimal/decimal.h> 00484 00485 #endif /* _GLIBCXX_DECIMAL */