Référence du fichier P:/wx_LIB/Dcml/decContext.h

#include <stdint.h>
#include <stdio.h>
#include <signal.h>

Aller au code source de ce fichier.

Classes

struct  decContext

Macros

#define DECCONTEXT
#define DECCNAME   "decContext"
#define DECCFULLNAME   "Decimal Context Descriptor"
#define DECCAUTHOR   "Mike Cowlishaw"
#define DECEXTFLAG   1
#define DECSUBSET   0
#define DEC_ROUND_DEFAULT   DEC_ROUND_HALF_EVEN;
#define DEC_MAX_DIGITS   999999999
#define DEC_MIN_DIGITS   1
#define DEC_MAX_EMAX   999999999
#define DEC_MIN_EMAX   0
#define DEC_MAX_EMIN   0
#define DEC_MIN_EMIN   -999999999
#define DEC_MAX_MATH   999999
#define DEC_ClassString_SN   "sNaN"
#define DEC_ClassString_QN   "NaN"
#define DEC_ClassString_NI   "-Infinity"
#define DEC_ClassString_NN   "-Normal"
#define DEC_ClassString_NS   "-Subnormal"
#define DEC_ClassString_NZ   "-Zero"
#define DEC_ClassString_PZ   "+Zero"
#define DEC_ClassString_PS   "+Subnormal"
#define DEC_ClassString_PN   "+Normal"
#define DEC_ClassString_PI   "+Infinity"
#define DEC_ClassString_UN   "Invalid"
#define DEC_Conversion_syntax   0x00000001
#define DEC_Division_by_zero   0x00000002
#define DEC_Division_impossible   0x00000004
#define DEC_Division_undefined   0x00000008
#define DEC_Insufficient_storage   0x00000010
#define DEC_Inexact   0x00000020
#define DEC_Invalid_context   0x00000040
#define DEC_Invalid_operation   0x00000080
#define DEC_Overflow   0x00000200
#define DEC_Clamped   0x00000400
#define DEC_Rounded   0x00000800
#define DEC_Subnormal   0x00001000
#define DEC_Underflow   0x00002000
#define DEC_IEEE_754_Division_by_zero   (DEC_Division_by_zero)
#define DEC_IEEE_754_Inexact   (DEC_Inexact)
#define DEC_IEEE_754_Invalid_operation
#define DEC_IEEE_754_Overflow   (DEC_Overflow)
#define DEC_IEEE_754_Underflow   (DEC_Underflow)
#define DEC_Errors
#define DEC_NaNs   DEC_IEEE_754_Invalid_operation
#define DEC_Information   (DEC_Clamped | DEC_Rounded | DEC_Inexact)
#define DEC_IEEE_854_Division_by_zero   DEC_IEEE_754_Division_by_zero
#define DEC_IEEE_854_Inexact   DEC_IEEE_754_Inexact
#define DEC_IEEE_854_Invalid_operation   DEC_IEEE_754_Invalid_operation
#define DEC_IEEE_854_Overflow   DEC_IEEE_754_Overflow
#define DEC_IEEE_854_Underflow   DEC_IEEE_754_Underflow
#define DEC_Condition_CS   "Conversion syntax"
#define DEC_Condition_DZ   "Division by zero"
#define DEC_Condition_DI   "Division impossible"
#define DEC_Condition_DU   "Division undefined"
#define DEC_Condition_IE   "Inexact"
#define DEC_Condition_IS   "Insufficient storage"
#define DEC_Condition_IC   "Invalid context"
#define DEC_Condition_IO   "Invalid operation"
#define DEC_Condition_OV   "Overflow"
#define DEC_Condition_PA   "Clamped"
#define DEC_Condition_RO   "Rounded"
#define DEC_Condition_SU   "Subnormal"
#define DEC_Condition_UN   "Underflow"
#define DEC_Condition_ZE   "No status"
#define DEC_Condition_MU   "Multiple status"
#define DEC_Condition_Length   21
#define DEC_INIT_BASE   0
#define DEC_INIT_DECIMAL32   32
#define DEC_INIT_DECIMAL64   64
#define DEC_INIT_DECIMAL128   128
#define DEC_INIT_DECSINGLE   DEC_INIT_DECIMAL32
#define DEC_INIT_DECDOUBLE   DEC_INIT_DECIMAL64
#define DEC_INIT_DECQUAD   DEC_INIT_DECIMAL128

Énumérations

enum  rounding {
  DEC_ROUND_CEILING, DEC_ROUND_UP, DEC_ROUND_HALF_UP, DEC_ROUND_HALF_EVEN,
  DEC_ROUND_HALF_DOWN, DEC_ROUND_DOWN, DEC_ROUND_FLOOR, DEC_ROUND_05UP,
  DEC_ROUND_MAX
}
enum  decClass {
  DEC_CLASS_SNAN, DEC_CLASS_QNAN, DEC_CLASS_NEG_INF, DEC_CLASS_NEG_NORMAL,
  DEC_CLASS_NEG_SUBNORMAL, DEC_CLASS_NEG_ZERO, DEC_CLASS_POS_ZERO, DEC_CLASS_POS_SUBNORMAL,
  DEC_CLASS_POS_NORMAL, DEC_CLASS_POS_INF
}

Fonctions

decContextdecContextClearStatus (decContext *, uint32_t)
decContextdecContextDefault (decContext *, int32_t)
enum rounding decContextGetRounding (decContext *)
uint32_t decContextGetStatus (decContext *)
decContextdecContextRestoreStatus (decContext *, uint32_t, uint32_t)
uint32_t decContextSaveStatus (decContext *, uint32_t)
decContextdecContextSetRounding (decContext *, enum rounding)
decContextdecContextSetStatus (decContext *, uint32_t)
decContextdecContextSetStatusFromString (decContext *, const char *)
decContextdecContextSetStatusFromStringQuiet (decContext *, const char *)
decContextdecContextSetStatusQuiet (decContext *, uint32_t)
const char * decContextStatusToString (const decContext *)
int32_t decContextTestEndian (uint8_t)
uint32_t decContextTestSavedStatus (uint32_t, uint32_t)
uint32_t decContextTestStatus (decContext *, uint32_t)
decContextdecContextZeroStatus (decContext *)


Documentation des macros

#define DEC_Clamped   0x00000400

Définition à la ligne 142 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), decDivideOp(), DecErrStatus(), decFinalize(), decNumberSquareRoot(), decSetOverflow(), et decSetSubnormal().

#define DEC_ClassString_NI   "-Infinity"

Définition à la ligne 116 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_NN   "-Normal"

Définition à la ligne 117 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_NS   "-Subnormal"

Définition à la ligne 118 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_NZ   "-Zero"

Définition à la ligne 119 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_PI   "+Infinity"

Définition à la ligne 123 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_PN   "+Normal"

Définition à la ligne 122 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_PS   "+Subnormal"

Définition à la ligne 121 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_PZ   "+Zero"

Définition à la ligne 120 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_QN   "NaN"

Définition à la ligne 115 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_SN   "sNaN"

Définition à la ligne 114 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_ClassString_UN   "Invalid"

Définition à la ligne 124 du fichier decContext.h.

Référencé par decNumberClassToString().

#define DEC_Condition_CS   "Conversion syntax"

Définition à la ligne 207 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_DI   "Division impossible"

Définition à la ligne 209 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_DU   "Division undefined"

Définition à la ligne 210 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_DZ   "Division by zero"

Définition à la ligne 208 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_IC   "Invalid context"

Définition à la ligne 213 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_IE   "Inexact"

Définition à la ligne 211 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_IO   "Invalid operation"

Définition à la ligne 214 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_IS   "Insufficient storage"

Définition à la ligne 212 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_Length   21

Définition à la ligne 225 du fichier decContext.h.

#define DEC_Condition_MU   "Multiple status"

Définition à la ligne 224 du fichier decContext.h.

Référencé par decContextStatusToString().

#define DEC_Condition_OV   "Overflow"

Définition à la ligne 218 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_PA   "Clamped"

Définition à la ligne 219 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_RO   "Rounded"

Définition à la ligne 220 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_SU   "Subnormal"

Définition à la ligne 221 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_UN   "Underflow"

Définition à la ligne 222 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), et decContextStatusToString().

#define DEC_Condition_ZE   "No status"

Définition à la ligne 223 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), et decContextStatusToString().

#define DEC_Conversion_syntax   0x00000001

Définition à la ligne 130 du fichier decContext.h.

Référencé par DecFloatContext::Clear_Conversion_syntax_status(), DecFloatContext::Conversion_syntax_status(), decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), DecErrStatus(), et decNumberFromString().

#define DEC_Division_by_zero   0x00000002

Définition à la ligne 131 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), decDivideOp(), DecErrStatus(), et decNumberLogB().

#define DEC_Division_impossible   0x00000004

Définition à la ligne 132 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), decDivideOp(), et DecErrStatus().

#define DEC_Division_undefined   0x00000008

Définition à la ligne 133 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), decDivideOp(), et DecErrStatus().

#define DEC_Errors

Valeur :

Définition à la ligne 185 du fichier decContext.h.

Référencé par decContextDefault().

#define DEC_IEEE_754_Division_by_zero   (DEC_Division_by_zero)

Définition à la ligne 169 du fichier decContext.h.

#define DEC_IEEE_754_Inexact   (DEC_Inexact)

Définition à la ligne 173 du fichier decContext.h.

#define DEC_IEEE_754_Invalid_operation

Valeur :

Définition à la ligne 175 du fichier decContext.h.

#define DEC_IEEE_754_Overflow   (DEC_Overflow)

Définition à la ligne 181 du fichier decContext.h.

#define DEC_IEEE_754_Underflow   (DEC_Underflow)

Définition à la ligne 182 du fichier decContext.h.

#define DEC_IEEE_854_Division_by_zero   DEC_IEEE_754_Division_by_zero

Définition à la ligne 200 du fichier decContext.h.

#define DEC_IEEE_854_Inexact   DEC_IEEE_754_Inexact

Définition à la ligne 201 du fichier decContext.h.

#define DEC_IEEE_854_Invalid_operation   DEC_IEEE_754_Invalid_operation

Définition à la ligne 202 du fichier decContext.h.

#define DEC_IEEE_854_Overflow   DEC_IEEE_754_Overflow

Définition à la ligne 203 du fichier decContext.h.

#define DEC_IEEE_854_Underflow   DEC_IEEE_754_Underflow

Définition à la ligne 204 du fichier decContext.h.

#define DEC_Inexact   0x00000020

Définition à la ligne 135 du fichier decContext.h.

Référencé par decAddOp(), decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), DecErrStatus(), decExpOp(), decLnOp(), decNumberLog10(), decNumberPower(), decNumberSquareRoot(), decQuantizeOp(), decSetCoeff(), decSetOverflow(), et decSetSubnormal().

#define DEC_Information   (DEC_Clamped | DEC_Rounded | DEC_Inexact)

Définition à la ligne 196 du fichier decContext.h.

#define DEC_INIT_BASE   0

Définition à la ligne 229 du fichier decContext.h.

Référencé par decContextDefault(), et decNumberTrim().

#define DEC_INIT_DECDOUBLE   DEC_INIT_DECIMAL64

Définition à la ligne 235 du fichier decContext.h.

#define DEC_INIT_DECIMAL128   128

Définition à la ligne 232 du fichier decContext.h.

Référencé par decContextDefault().

#define DEC_INIT_DECIMAL32   32

Définition à la ligne 230 du fichier decContext.h.

Référencé par decContextDefault().

#define DEC_INIT_DECIMAL64   64

Définition à la ligne 231 du fichier decContext.h.

Référencé par decContextDefault(), decExpOp(), decLnOp(), decNumberLog10(), decNumberPower(), et decNumberSquareRoot().

#define DEC_INIT_DECQUAD   DEC_INIT_DECIMAL128

Définition à la ligne 236 du fichier decContext.h.

#define DEC_INIT_DECSINGLE   DEC_INIT_DECIMAL32

Définition à la ligne 234 du fichier decContext.h.

#define DEC_Insufficient_storage   0x00000010

Définition à la ligne 134 du fichier decContext.h.

Référencé par decAddOp(), decCompareOp(), decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), decDivideOp(), DecErrStatus(), decExpOp(), decFinalize(), decLnOp(), decMultiplyOp(), decNumberCompareTotalMag(), decNumberFMA(), decNumberLog10(), decNumberNextToward(), decNumberPower(), et decNumberSquareRoot().

#define DEC_Invalid_context   0x00000040

Définition à la ligne 136 du fichier decContext.h.

Référencé par decApplyRound(), decCheckMath(), decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), et DecErrStatus().

#define DEC_Invalid_operation   0x00000080

Définition à la ligne 137 du fichier decContext.h.

Référencé par decAddOp(), decCheckMath(), decCompareOp(), decContextDefault(), decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), decDivideOp(), DecErrStatus(), decLnOp(), decMultiplyOp(), decNaNs(), decNumberAnd(), decNumberFMA(), decNumberInvert(), decNumberLn(), decNumberLog10(), decNumberNextMinus(), decNumberNextPlus(), decNumberOr(), decNumberPower(), decNumberRotate(), decNumberScaleB(), decNumberShift(), decNumberSquareRoot(), decNumberToInt32(), decNumberToIntegralValue(), decNumberToUInt32(), decNumberXor(), decQuantizeOp(), et decSetSubnormal().

#define DEC_MAX_DIGITS   999999999

Définition à la ligne 90 du fichier decContext.h.

#define DEC_MAX_EMAX   999999999

Définition à la ligne 92 du fichier decContext.h.

Référencé par decContextDefault(), decNumberFMA(), et decNumberSquareRoot().

#define DEC_MAX_EMIN   0

Définition à la ligne 94 du fichier decContext.h.

#define DEC_MAX_MATH   999999

Définition à la ligne 96 du fichier decContext.h.

Référencé par decCheckMath(), decLnOp(), decNumberLog10(), et decNumberPower().

#define DEC_MIN_DIGITS   1

Définition à la ligne 91 du fichier decContext.h.

#define DEC_MIN_EMAX   0

Définition à la ligne 93 du fichier decContext.h.

#define DEC_MIN_EMIN   -999999999

Définition à la ligne 95 du fichier decContext.h.

Référencé par decContextDefault(), decExpOp(), decNumberFMA(), decNumberNextMinus(), decNumberNextPlus(), decNumberNextToward(), et decNumberSquareRoot().

#define DEC_NaNs   DEC_IEEE_754_Invalid_operation

Définition à la ligne 189 du fichier decContext.h.

Référencé par decNumberLog10(), et decStatus().

#define DEC_Overflow   0x00000200

Définition à la ligne 141 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), DecErrStatus(), decExpOp(), decNumberPower(), decNumberSquareRoot(), et decSetOverflow().

#define DEC_ROUND_DEFAULT   DEC_ROUND_HALF_EVEN;

Définition à la ligne 74 du fichier decContext.h.

#define DEC_Rounded   0x00000800

Définition à la ligne 143 du fichier decContext.h.

Référencé par decAddOp(), decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), DecErrStatus(), decExpOp(), decLnOp(), decNumberPower(), decNumberSquareRoot(), decQuantizeOp(), decSetCoeff(), decSetOverflow(), et decSetSubnormal().

#define DEC_Subnormal   0x00001000

Définition à la ligne 144 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), DecErrStatus(), decNumberPower(), decNumberSquareRoot(), et decSetSubnormal().

#define DEC_Underflow   0x00002000

Définition à la ligne 145 du fichier decContext.h.

Référencé par decContextSetStatusFromString(), decContextSetStatusFromStringQuiet(), DecContextStatusString(), decContextStatusToString(), DecErrStatus(), decExpOp(), decNumberPower(), decNumberSquareRoot(), decQuantizeOp(), et decSetSubnormal().

#define DECCAUTHOR   "Mike Cowlishaw"

Définition à la ligne 44 du fichier decContext.h.

#define DECCFULLNAME   "Decimal Context Descriptor"

Définition à la ligne 43 du fichier decContext.h.

#define DECCNAME   "decContext"

Définition à la ligne 42 du fichier decContext.h.

#define DECCONTEXT

Définition à la ligne 41 du fichier decContext.h.

#define DECEXTFLAG   1

Définition à la ligne 54 du fichier decContext.h.

#define DECSUBSET   0

Définition à la ligne 59 du fichier decContext.h.

Référencé par decAddOp().


Documentation du type de l'énumération

enum decClass

Valeurs énumérées:
DEC_CLASS_SNAN 
DEC_CLASS_QNAN 
DEC_CLASS_NEG_INF 
DEC_CLASS_NEG_NORMAL 
DEC_CLASS_NEG_SUBNORMAL 
DEC_CLASS_NEG_ZERO 
DEC_CLASS_POS_ZERO 
DEC_CLASS_POS_SUBNORMAL 
DEC_CLASS_POS_NORMAL 
DEC_CLASS_POS_INF 

Définition à la ligne 101 du fichier decContext.h.

enum rounding

Valeurs énumérées:
DEC_ROUND_CEILING 
DEC_ROUND_UP 
DEC_ROUND_HALF_UP 
DEC_ROUND_HALF_EVEN 
DEC_ROUND_HALF_DOWN 
DEC_ROUND_DOWN 
DEC_ROUND_FLOOR 
DEC_ROUND_05UP 
DEC_ROUND_MAX 

Définition à la ligne 63 du fichier decContext.h.

00063                 {
00064     DEC_ROUND_CEILING,             /* round towards +infinity         */
00065     DEC_ROUND_UP,                  /* round away from 0               */
00066     DEC_ROUND_HALF_UP,             /* 0.5 rounds up                   */
00067     DEC_ROUND_HALF_EVEN,           /* 0.5 rounds to nearest even      */
00068     DEC_ROUND_HALF_DOWN,           /* 0.5 rounds down                 */
00069     DEC_ROUND_DOWN,                /* round towards 0 (truncate)      */
00070     DEC_ROUND_FLOOR,               /* round towards -infinity         */
00071     DEC_ROUND_05UP,                /* round for reround               */
00072     DEC_ROUND_MAX                  /* enum must be less than this     */
00073     };


Documentation des fonctions

decContext* decContextClearStatus ( decContext ,
uint32_t   
)

decContext* decContextDefault ( decContext ,
int32_t   
)

enum rounding decContextGetRounding ( decContext  ) 

Définition à la ligne 142 du fichier decContext.c.

Références decContext::round.

00142                                                          {
00143   return context->round;
00144   } // decContextGetRounding

uint32_t decContextGetStatus ( decContext  ) 

Définition à la ligne 154 du fichier decContext.c.

Références decContext::status.

00154                                               {
00155   return context->status;
00156   } // decContextGetStatus

decContext* decContextRestoreStatus ( decContext ,
uint32_t  ,
uint32_t   
)

uint32_t decContextSaveStatus ( decContext ,
uint32_t   
)

decContext* decContextSetRounding ( decContext ,
enum  rounding 
)

Définition à la ligne 200 du fichier decContext.c.

Références decContext::round.

00201                                                           {
00202   context->round=newround;
00203   return context;
00204   } // decContextSetRounding

decContext* decContextSetStatus ( decContext ,
uint32_t   
)

decContext* decContextSetStatusFromString ( decContext ,
const char *   
)

Définition à la ligne 235 du fichier decContext.c.

Références 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_Condition_ZE, 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 decContextSetStatus().

00236                                                                {
00237   if (strcmp(string, DEC_Condition_CS)==0)
00238     return decContextSetStatus(context, DEC_Conversion_syntax);
00239   if (strcmp(string, DEC_Condition_DZ)==0)
00240     return decContextSetStatus(context, DEC_Division_by_zero);
00241   if (strcmp(string, DEC_Condition_DI)==0)
00242     return decContextSetStatus(context, DEC_Division_impossible);
00243   if (strcmp(string, DEC_Condition_DU)==0)
00244     return decContextSetStatus(context, DEC_Division_undefined);
00245   if (strcmp(string, DEC_Condition_IE)==0)
00246     return decContextSetStatus(context, DEC_Inexact);
00247   if (strcmp(string, DEC_Condition_IS)==0)
00248     return decContextSetStatus(context, DEC_Insufficient_storage);
00249   if (strcmp(string, DEC_Condition_IC)==0)
00250     return decContextSetStatus(context, DEC_Invalid_context);
00251   if (strcmp(string, DEC_Condition_IO)==0)
00252     return decContextSetStatus(context, DEC_Invalid_operation);
00253   #if DECSUBSET
00254   if (strcmp(string, DEC_Condition_LD)==0)
00255     return decContextSetStatus(context, DEC_Lost_digits);
00256   #endif
00257   if (strcmp(string, DEC_Condition_OV)==0)
00258     return decContextSetStatus(context, DEC_Overflow);
00259   if (strcmp(string, DEC_Condition_PA)==0)
00260     return decContextSetStatus(context, DEC_Clamped);
00261   if (strcmp(string, DEC_Condition_RO)==0)
00262     return decContextSetStatus(context, DEC_Rounded);
00263   if (strcmp(string, DEC_Condition_SU)==0)
00264     return decContextSetStatus(context, DEC_Subnormal);
00265   if (strcmp(string, DEC_Condition_UN)==0)
00266     return decContextSetStatus(context, DEC_Underflow);
00267   if (strcmp(string, DEC_Condition_ZE)==0)
00268     return context;
00269   return NULL;  // Multiple status, or unknown
00270   } // decContextSetStatusFromString

decContext* decContextSetStatusFromStringQuiet ( decContext ,
const char *   
)

Définition à la ligne 286 du fichier decContext.c.

Références 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_Condition_ZE, 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 decContextSetStatusQuiet().

00287                                                                     {
00288   if (strcmp(string, DEC_Condition_CS)==0)
00289     return decContextSetStatusQuiet(context, DEC_Conversion_syntax);
00290   if (strcmp(string, DEC_Condition_DZ)==0)
00291     return decContextSetStatusQuiet(context, DEC_Division_by_zero);
00292   if (strcmp(string, DEC_Condition_DI)==0)
00293     return decContextSetStatusQuiet(context, DEC_Division_impossible);
00294   if (strcmp(string, DEC_Condition_DU)==0)
00295     return decContextSetStatusQuiet(context, DEC_Division_undefined);
00296   if (strcmp(string, DEC_Condition_IE)==0)
00297     return decContextSetStatusQuiet(context, DEC_Inexact);
00298   if (strcmp(string, DEC_Condition_IS)==0)
00299     return decContextSetStatusQuiet(context, DEC_Insufficient_storage);
00300   if (strcmp(string, DEC_Condition_IC)==0)
00301     return decContextSetStatusQuiet(context, DEC_Invalid_context);
00302   if (strcmp(string, DEC_Condition_IO)==0)
00303     return decContextSetStatusQuiet(context, DEC_Invalid_operation);
00304   #if DECSUBSET
00305   if (strcmp(string, DEC_Condition_LD)==0)
00306     return decContextSetStatusQuiet(context, DEC_Lost_digits);
00307   #endif
00308   if (strcmp(string, DEC_Condition_OV)==0)
00309     return decContextSetStatusQuiet(context, DEC_Overflow);
00310   if (strcmp(string, DEC_Condition_PA)==0)
00311     return decContextSetStatusQuiet(context, DEC_Clamped);
00312   if (strcmp(string, DEC_Condition_RO)==0)
00313     return decContextSetStatusQuiet(context, DEC_Rounded);
00314   if (strcmp(string, DEC_Condition_SU)==0)
00315     return decContextSetStatusQuiet(context, DEC_Subnormal);
00316   if (strcmp(string, DEC_Condition_UN)==0)
00317     return decContextSetStatusQuiet(context, DEC_Underflow);
00318   if (strcmp(string, DEC_Condition_ZE)==0)
00319     return context;
00320   return NULL;  // Multiple status, or unknown
00321   } // decContextSetStatusFromStringQuiet

decContext* decContextSetStatusQuiet ( decContext ,
uint32_t   
)

const char* decContextStatusToString ( const decContext  ) 

Définition à la ligne 344 du fichier decContext.c.

Références 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_MU, DEC_Condition_OV, DEC_Condition_PA, DEC_Condition_RO, DEC_Condition_SU, DEC_Condition_UN, DEC_Condition_ZE, 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, Int, et decContext::status.

Référencé par DecFloatContext::StatusToString().

00344                                                                 {
00345   Int status=context->status;
00346 
00347   // test the five IEEE first, as some of the others are ambiguous when
00348   // DECEXTFLAG=0
00349   if (status==DEC_Invalid_operation    ) return DEC_Condition_IO;
00350   if (status==DEC_Division_by_zero     ) return DEC_Condition_DZ;
00351   if (status==DEC_Overflow             ) return DEC_Condition_OV;
00352   if (status==DEC_Underflow            ) return DEC_Condition_UN;
00353   if (status==DEC_Inexact              ) return DEC_Condition_IE;
00354 
00355   if (status==DEC_Division_impossible  ) return DEC_Condition_DI;
00356   if (status==DEC_Division_undefined   ) return DEC_Condition_DU;
00357   if (status==DEC_Rounded              ) return DEC_Condition_RO;
00358   if (status==DEC_Clamped              ) return DEC_Condition_PA;
00359   if (status==DEC_Subnormal            ) return DEC_Condition_SU;
00360   if (status==DEC_Conversion_syntax    ) return DEC_Condition_CS;
00361   if (status==DEC_Insufficient_storage ) return DEC_Condition_IS;
00362   if (status==DEC_Invalid_context      ) return DEC_Condition_IC;
00363   #if DECSUBSET
00364   if (status==DEC_Lost_digits          ) return DEC_Condition_LD;
00365   #endif
00366   if (status==0                        ) return DEC_Condition_ZE;
00367   return DEC_Condition_MU;  // Multiple errors
00368   } // decContextStatusToString

int32_t decContextTestEndian ( uint8_t   ) 

uint32_t decContextTestSavedStatus ( uint32_t  ,
uint32_t   
)

uint32_t decContextTestStatus ( decContext ,
uint32_t   
)

decContext* decContextZeroStatus ( decContext  ) 

Définition à la ligne 436 du fichier decContext.c.

Références decContext::status.

00436                                                       {
00437   context->status=0;
00438   return context;
00439   } // decContextZeroStatus


Généré le Mon Jul 20 18:22:14 2009 pour Decimal par  doxygen 1.5.1-p1