#include <cstring>
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <Dcml/decNumber.c>
#include <Dcml/decContext.c>
Aller au code source de ce fichier.
#define DEC_English 56 |
Définition à la ligne 38 du fichier DecFloat.hpp.
Référencé par DecFloat_::DecFloat_(), decNumberFromString(), DecFloat_::operator=(), DecFloat_::ToChar(), et DecFloat_::ToStr().
#define DEC_French 78 |
Définition à la ligne 39 du fichier DecFloat.hpp.
Référencé par DecFloat_::DecFloat_(), decNumberFromString(), DecFloat_::operator=(), DecFloat_::ToChar(), et DecFloat_::ToStr().
#define DECNUMDIGITS 128 |
Définition à la ligne 37 du fichier DecFloat.hpp.
Référencé par DecFloatContext::DecFloatContext(), DecFloat_::ToChar(), et DecFloat_::ToStr().
Définition à la ligne 642 du fichier DecFloat.hpp.
Définition à la ligne 578 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberAbs(), et DecFloatContext::get().
Référencé par decNumberRotate(), decNumberScaleB(), et decNumberShift().
00579 { 00580 DecFloat_ result, x=a; 00581 decNumberAbs(&(result.d), &(x.d), Context.get()); 00582 return result; 00583 }
string DecContextStatusString | ( | ) |
Définition à la ligne 131 du fichier DecFloat.hpp.
Références Context, DEC_Clamped, DEC_Condition_CS, DEC_Condition_DI, DEC_Condition_DU, DEC_Condition_DZ, DEC_Condition_IC, DEC_Condition_IE, DEC_Condition_IO, DEC_Condition_IS, DEC_Condition_OV, DEC_Condition_PA, DEC_Condition_RO, DEC_Condition_SU, DEC_Condition_UN, DEC_Conversion_syntax, DEC_Division_by_zero, DEC_Division_impossible, DEC_Division_undefined, DEC_Inexact, DEC_Insufficient_storage, DEC_Invalid_context, DEC_Invalid_operation, DEC_Overflow, DEC_Rounded, DEC_Subnormal, DEC_Underflow, et DecFloatContext::status().
00132 { 00133 int status=Context.status(); 00134 string result; 00135 if (status&DEC_Conversion_syntax ) result+=string(DEC_Condition_CS)+"; "; 00136 if (status&DEC_Division_by_zero ) result+=string(DEC_Condition_DZ)+"; "; 00137 if (status&DEC_Division_impossible ) result+=string(DEC_Condition_DI)+"; "; 00138 if (status&DEC_Division_undefined ) result+=string(DEC_Condition_DU)+"; "; 00139 if (status&DEC_Inexact ) result+=string(DEC_Condition_IE)+"; "; 00140 if (status&DEC_Insufficient_storage ) result+=string(DEC_Condition_IS)+"; "; 00141 if (status&DEC_Invalid_context ) result+=string(DEC_Condition_IC)+"; "; 00142 if (status&DEC_Invalid_operation ) result+=string(DEC_Condition_IO)+"; "; 00143 #if DECSUBSET 00144 if (status&DEC_Lost_digits ) result+=string(DEC_Condition_LD)+"; "; 00145 #endif 00146 if (status&DEC_Overflow ) result+=string(DEC_Condition_OV)+"; "; 00147 if (status&DEC_Clamped ) result+=string(DEC_Condition_PA)+"; "; 00148 if (status&DEC_Rounded ) result+=string(DEC_Condition_RO)+"; "; 00149 if (status&DEC_Subnormal ) result+=string(DEC_Condition_SU)+"; "; 00150 if (status&DEC_Underflow ) result+=string(DEC_Condition_UN)+"; "; 00151 //if (status&0 ) result+=string(DEC_Condition_ZE)+";; 00152 return result; 00153 }
bool DecErrStatus | ( | ) |
Définition à la ligne 157 du fichier DecFloat.hpp.
Références Context, DEC_Clamped, DEC_Conversion_syntax, DEC_Division_by_zero, DEC_Division_impossible, DEC_Division_undefined, DEC_Inexact, DEC_Insufficient_storage, DEC_Invalid_context, DEC_Invalid_operation, DEC_Overflow, DEC_Rounded, DEC_Subnormal, DEC_Underflow, et DecFloatContext::status().
00158 { 00159 int status=Context.status(); 00160 bool err = false; 00161 if (status&DEC_Conversion_syntax ) err = true; 00162 if (status&DEC_Division_by_zero ) err = true; 00163 if (status&DEC_Division_impossible ) err = true; 00164 if (status&DEC_Division_undefined ) err = true; 00165 if (status&DEC_Inexact ) err = true; 00166 if (status&DEC_Insufficient_storage ) err = true; 00167 if (status&DEC_Invalid_context ) err = true; 00168 if (status&DEC_Invalid_operation ) err = true; 00169 00170 #if DECSUBSET 00171 if (status&DEC_Lost_digits ) err = true; 00172 #endif 00173 if (status&DEC_Overflow ) err = true; 00174 if (status&DEC_Clamped ) err = true; 00175 if (status&DEC_Rounded ) err = true; 00176 if (status&DEC_Subnormal ) err = true; 00177 if (status&DEC_Underflow ) err = true; 00178 //if (status&0 ) result+=string(DEC_Condition_ZE)+";; 00179 return err; 00180 }
Définition à la ligne 592 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberDivideInteger(), et DecFloatContext::get().
00593 { 00594 DecFloat_ result, a=x, b=y; 00595 decNumberDivideInteger(&(result.d), &(a.d), &(b.d), Context.get()); 00596 return result; 00597 }
Définition à la ligne 613 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberMax(), et DecFloatContext::get().
00614 { 00615 DecFloat_ result, a=x, b=y; 00616 decNumberMax(&(result.d), &(a.d), &(b.d), Context.get()); 00617 return result; 00618 }
Définition à la ligne 606 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberMin(), et DecFloatContext::get().
00607 { 00608 DecFloat_ result, a=x, b=y; 00609 decNumberMin(&(result.d), &(a.d), &(b.d), Context.get()); 00610 return result; 00611 }
Définition à la ligne 554 du fichier DecFloat.hpp.
00555 { 00556 DecFloat_ x=a; 00557 return x*=b; 00558 }
Définition à la ligne 572 du fichier DecFloat.hpp.
00573 { 00574 DecFloat_ x=a; 00575 return x%=b; 00576 }
Définition à la ligne 548 du fichier DecFloat.hpp.
00549 { 00550 DecFloat_ x=a; 00551 return x+=b; 00552 }
Définition à la ligne 560 du fichier DecFloat.hpp.
00561 { 00562 DecFloat_ x=a; 00563 return x-=b; 00564 }
Définition à la ligne 566 du fichier DecFloat.hpp.
00567 { 00568 DecFloat_ x=a; 00569 return x/=b; 00570 }
Définition à la ligne 511 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberCompare(), decNumberCopy_(), decNumberIsNegative, decNumberIsZero, et DecFloatContext::get().
00512 { 00513 00514 decNumber d, a=lhs.d, b=rhs.d; // // nur notwendig, weil Parameter nicht const 00515 // Is decNumberCopy necessary here? 00516 decNumberCopy_(&a,&(lhs.d)); 00517 decNumberCopy_(&b,&(rhs.d)); 00518 // decNumberCompare(&d, &a, &b, lhs.context.get()); 00519 decNumberCompare(&d, &a, &b, Context.get()); 00520 // returns 0, if a==b 00521 return (decNumberIsNegative(&d)==1) && (decNumberIsZero(&d)!=1); // returns 1 if d==0 00522 }
ostream& operator<< | ( | ostream & | f, | |
const DecFloat_ & | b | |||
) | [inline] |
Définition à la ligne 627 du fichier DecFloat.hpp.
Références DecFloat_::ToStr().
00628 { 00629 00630 return f<<b.ToStr(); 00631 }
Définition à la ligne 497 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberCompare(), decNumberCopy_(), decNumberIsZero, et DecFloatContext::get().
00498 { 00499 decNumber d, a=lhs.d, b=rhs.d; // // nur notwendig, weil Parameter nicht const 00500 // Is decNumberCopy necessary here? 00501 decNumberCopy_(&a,&(lhs.d)); 00502 decNumberCopy_(&b,&(rhs.d)); 00503 // Must lhs and rhs have the same context??? 00504 decNumberCompare(&d, &a, &b, Context.get()); 00505 // returns 0, if a==b 00506 return decNumberIsZero(&d)==1; // returns 1 if d==0 00507 00508 00509 }
istream& operator>> | ( | istream & | f, | |
DecFloat_ & | b | |||
) | [inline] |
Définition à la ligne 633 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberFromString(), et DecFloatContext::get().
00634 { 00635 string s; 00636 f>>s; 00637 char* ps=(char*)s.c_str(); // nur notwendig, weil Parameter nicht const 00638 decNumberFromString(&(b.d), ps, Context.get()); // cast -- nicht gut ??? 00639 return f; 00640 }
Définition à la ligne 585 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberPower(), et DecFloatContext::get().
Référencé par decDivideOp(), decGetDigits(), et decToString().
00586 { 00587 DecFloat_ result, a=x, b=y; 00588 decNumberPower(&(result.d), &(a.d), &(b.d), Context.get()); 00589 return result; 00590 }
Définition à la ligne 599 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberRemainderNear(), et DecFloatContext::get().
00600 { 00601 DecFloat_ result, a=x, b=y; 00602 decNumberRemainderNear(&(result.d), &(a.d), &(b.d), Context.get()); 00603 return result; 00604 }
Définition à la ligne 620 du fichier DecFloat.hpp.
Références Context, DecFloat_::d, decNumberSquareRoot(), et DecFloatContext::get().
00621 { 00622 DecFloat_ result, a=x; 00623 decNumberSquareRoot(&(result.d), &(a.d), Context.get()); 00624 return result; 00625 }
int _EnFr_ = DEC_English |
Définition à la ligne 40 du fichier DecFloat.hpp.
Référencé par DecFloat_::DecFloat_(), decNumberFromString(), DecFloat_::operator=(), DecFloat_::ToChar(), et DecFloat_::ToStr().
DecFloatContext Context(DEC_INIT_DECIMAL128) |
Référencé par abs(), DecContextStatusString(), DecErrStatus(), DecFloat_::DecFloat_(), DivideInteger(), max(), min(), DecFloat_::Normalize(), DecFloat_::operator *=(), DecFloat_::operator%=(), DecFloat_::operator+(), DecFloat_::operator+=(), DecFloat_::operator-(), DecFloat_::operator-=(), DecFloat_::operator/=(), operator<(), DecFloat_::operator=(), operator==(), operator>>(), pow(), DecFloat_::Quantize(), RemainderNear(), DecFloat_::Rescale(), sqrt(), DecFloat_::ToChar(), et DecFloat_::ToIntegralValue().