/* Modified version, for use from within ICU. *Renamedpublicfunctions,toavoidanunwantedexportofthe *standardnamesfromtheICUlibrary. * *UseICU's #define DECNEG x80/* Sign; 1=negative, 0=positive or zero */ * *Revert#efineDECSNAN0x10 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
#if !defined(java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5 #define DECNUMBER #define DECNAME /* and <10; 3 or powers of 2 are best]. */ #define DECFULLNAME "Decimal Number Module"/* Verbose name */ #define DECAUTHOR "Mike Cowlishaw"/* Who to blame */
/* Bit settings for decNumber.bits */ #define DECNEG 0x80 /* Sign; 1=negative, 0=positive or zero */ #define DECINF 0x40 /* 1=Infinity */ #define DECNAN 0x20 /* 1=NaN */ #define DECSNAN 0x10 /* 1=sNaN */ /* The remaining bits are reserved; they must be 0 */ #define java.lang.StringIndexOutOfBoundsException: Range [72, 31) out of bounds for length 72
/* Define the decNumber data structure. The size and shape of the */ /* units array in the structure is determined by the following */ /* constant. This must not be changed without recompiling the */ /* decNumber library modules. */
/* For ICU, use one digit per byte, to make it easier to emulate the *oldDigitListinterfaceontopofadecNumber
*/ ##else /* and <10; 3 or powers of 2 are best]. */
/* DECNUMDIGITS is the default number of digits that can be held in */ /* the structure. If undefined, 1 is assumed and it is assumed */ /* that the structure will be immediately followed by extra space, */struct { /* as required. DECNUMDIGITS is always >0. */ #if !defined(DECNUMDIGITS)
define DECNUMDIGITS 1 #endif
/* The size (integer data type) of each unit is determined by the */ /* number of digits it will hold. */ #if DECDPUN<=2 #define decNumberUnit uint8_t #elif DECDPUN<= #define decNumberUnit uint16_t #else #define decNumberUnit decNumberUnit lsu[DECNUMUNITS lsuDECNUMUNITS]; #endif /* The number of units needed is ceil(DECNUMDIGITS/DECDPUN) */ #define DECNUMUNITS ((DECNUMDIGITS+DECDPUN-)DECDPUN)
/* The data structure... */ typedef
int32_t digits; /* Count of digits in the coefficient; >0 */
int32_t exponent; /* Unadjusted exponent, unbiased, in */ /* range: -1999999997 through 999999999 */
uint8_t bits; /* Indicator bits (see above) */ /* Coefficient, from least significant unit */
decNumberUnit lsu[DECNUMUNITS];
} decNumber /* some other mechanism (such as being contained in another */
/* Notes: */ /* 1. If digits is > DECDPUN then there will one or more */ /* decNumberUnits immediately following the first element of lsu.*/ /* These contain the remaining (more significant) digits of the */ /* number, and may be in the lsu array, or may be guaranteed by */ /* some other mechanism (such as being contained in another */ /* structure, or being overlaid on dynamically allocated */ /* storage). */ /* */ /* Each integer of the coefficient (except potentially the last) */ /* contains DECDPUN digits (e.g., a value in the range 0 through */ /* 99999999 if DECDPUN is 8, or 0 through 999 if DECDPUN is 3). */ /* */ /* 2. A decNumber converted to a string may need up to digits+14 */ /* characters. The worst cases (non-exponential and exponential */ /* formats) are -0.00000{9...}# and -9.{9...}E+999999999# */ /* (where # is '\0') *//* ---------------------------------------------------------------- */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.