HPGCC3 Documentation 3.0 R003

decNumberLocal.h File Reference

#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  bcdnum

Defines

#define DECVERSION   "decNumber 3.50"
#define DECNLAUTHOR   "Mike Cowlishaw"
#define DECLITEND   1
#define DECUSE64   0
#define DECCHECK   0
#define DECALLOC   0
#define DECTRACE   0
#define DECBUFFER   36
#define Flag   uint8_t
#define Byte   int8_t
#define uByte   uint8_t
#define Short   int16_t
#define uShort   uint16_t
#define Int   int32_t
#define uInt   uint32_t
#define Unit   decNumberUnit
#define DECNOINT   0
#define LONGMUL32HI(w, u, v)
#define ROUNDUP(i, n)   ((((i)+(n)-1)/n)*n)
#define ROUNDDOWN(i, n)   (((i)/n)*n)
#define ROUNDDOWN4(i)   ((i)&~3)
#define UINTAT(b)   (*((uInt *)(b)))
#define USHORTAT(b)   (*((uShort *)(b)))
#define UBYTEAT(b)   (*((uByte *)(b)))
#define X10(i)   (((i)<<1)+((i)<<3))
#define X100(i)   (((i)<<2)+((i)<<5)+((i)<<6))
#define MAXI(x, y)   ((x)<(y)?(y):(x))
#define MINI(x, y)   ((x)>(y)?(y):(x))
#define BILLION   1000000000
#define CHARMASK   ((((((((uInt)'0')<<8)+'0')<<8)+'0')<<8)+'0')
#define DECNUMMAXP   999999999
#define DECNUMMAXE   999999999
#define DECNUMMINE   -999999999
#define DECMAXD2U   49
#define ISZERO(dn)   decNumberIsZero(dn)
#define D2U(d)   ((d)<=DECMAXD2U?d2utable[d]:((d)+DECDPUN-1)/DECDPUN)
#define SD2U(d)   (((d)+DECDPUN-1)/DECDPUN)
#define MSUDIGITS(d)   ((d)-(D2U(d)-1)*DECDPUN)
#define D2N(d)   ((((SD2U(d)-1)*sizeof(Unit))+sizeof(decNumber)*2-1)/sizeof(decNumber))
#define TODIGIT(u, cut, c, pow)
#define EXPISSPECIAL(exp)   ((exp)>=DECFLOAT_MinSp)
#define EXPISINF(exp)   (exp==DECFLOAT_Inf)
#define EXPISNAN(exp)   (exp==DECFLOAT_qNaN || exp==DECFLOAT_sNaN)
#define NUMISSPECIAL(num)   (EXPISSPECIAL((num)->exponent))
#define DECWORDS   (DECBYTES/4)
#define DECWWORDS   (DECWBYTES/4)
#define DFWORD(df, off)   UINTAT((df)->bytes+(DECWORDS-1-(off))*4)
#define DFBYTE(df, off)   UBYTEAT((df)->bytes+(DECBYTES-1-(off)))
#define DFWWORD(dfw, off)   UINTAT((dfw)->bytes+(DECWWORDS-1-(off))*4)
#define DFISSIGNED(df)   (DFWORD(df, 0)&0x80000000)
#define DFISSPECIAL(df)   ((DFWORD(df, 0)&0x78000000)==0x78000000)
#define DFISINF(df)   ((DFWORD(df, 0)&0x7c000000)==0x78000000)
#define DFISNAN(df)   ((DFWORD(df, 0)&0x7c000000)==0x7c000000)
#define DFISQNAN(df)   ((DFWORD(df, 0)&0x7e000000)==0x7c000000)
#define DFISSNAN(df)   ((DFWORD(df, 0)&0x7e000000)==0x7e000000)

Typedefs

typedef long int LI

Variables

const uByte DECSTICKYTAB [10]
const uInt DECPOWERS [10]
const uShort DPD2BIN [1024]
const uShort BIN2DPD [1000]
const uInt DPD2BINK [1024]
const uInt DPD2BINM [1024]
const uByte DPD2BCD8 [4096]
const uByte BIN2BCD8 [4000]
const uShort BCD2DPD [2458]
const uByte d2utable [DECMAXD2U+1]
const uInt DECCOMBMSD [64]
const uInt DECCOMBFROM [48]

Define Documentation

#define BILLION   1000000000

Definition at line 131 of file decNumberLocal.h.

#define Byte   int8_t

Definition at line 59 of file decNumberLocal.h.

#define CHARMASK   ((((((((uInt)'0')<<8)+'0')<<8)+'0')<<8)+'0')

Definition at line 133 of file decNumberLocal.h.

#define D2N (   d)    ((((SD2U(d)-1)*sizeof(Unit))+sizeof(decNumber)*2-1)/sizeof(decNumber))

Definition at line 238 of file decNumberLocal.h.

#define D2U (   d)    ((d)<=DECMAXD2U?d2utable[d]:((d)+DECDPUN-1)/DECDPUN)

Definition at line 224 of file decNumberLocal.h.

#define DECALLOC   0

Definition at line 43 of file decNumberLocal.h.

#define DECBUFFER   36

Definition at line 47 of file decNumberLocal.h.

#define DECCHECK   0

Definition at line 42 of file decNumberLocal.h.

#define DECLITEND   1

Definition at line 36 of file decNumberLocal.h.

#define DECMAXD2U   49

Definition at line 209 of file decNumberLocal.h.

#define DECNLAUTHOR   "Mike Cowlishaw"

Definition at line 28 of file decNumberLocal.h.

#define DECNOINT   0

Definition at line 73 of file decNumberLocal.h.

#define DECNUMMAXE   999999999

Definition at line 143 of file decNumberLocal.h.

#define DECNUMMAXP   999999999

Definition at line 142 of file decNumberLocal.h.

#define DECNUMMINE   -999999999

Definition at line 144 of file decNumberLocal.h.

#define DECTRACE   0

Definition at line 44 of file decNumberLocal.h.

#define DECUSE64   0

Definition at line 39 of file decNumberLocal.h.

#define DECVERSION   "decNumber 3.50"

Definition at line 27 of file decNumberLocal.h.

#define DECWORDS   (DECBYTES/4)

Definition at line 288 of file decNumberLocal.h.

#define DECWWORDS   (DECWBYTES/4)

Definition at line 289 of file decNumberLocal.h.

#define DFBYTE (   df,
  off 
)    UBYTEAT((df)->bytes+(DECBYTES-1-(off)))

Definition at line 292 of file decNumberLocal.h.

#define DFISINF (   df)    ((DFWORD(df, 0)&0x7c000000)==0x78000000)

Definition at line 303 of file decNumberLocal.h.

#define DFISNAN (   df)    ((DFWORD(df, 0)&0x7c000000)==0x7c000000)

Definition at line 304 of file decNumberLocal.h.

#define DFISQNAN (   df)    ((DFWORD(df, 0)&0x7e000000)==0x7c000000)

Definition at line 305 of file decNumberLocal.h.

#define DFISSIGNED (   df)    (DFWORD(df, 0)&0x80000000)

Definition at line 301 of file decNumberLocal.h.

#define DFISSNAN (   df)    ((DFWORD(df, 0)&0x7e000000)==0x7e000000)

Definition at line 306 of file decNumberLocal.h.

#define DFISSPECIAL (   df)    ((DFWORD(df, 0)&0x78000000)==0x78000000)

Definition at line 302 of file decNumberLocal.h.

#define DFWORD (   df,
  off 
)    UINTAT((df)->bytes+(DECWORDS-1-(off))*4)

Definition at line 291 of file decNumberLocal.h.

#define DFWWORD (   dfw,
  off 
)    UINTAT((dfw)->bytes+(DECWWORDS-1-(off))*4)

Definition at line 293 of file decNumberLocal.h.

#define EXPISINF (   exp)    (exp==DECFLOAT_Inf)

Definition at line 280 of file decNumberLocal.h.

#define EXPISNAN (   exp)    (exp==DECFLOAT_qNaN || exp==DECFLOAT_sNaN)

Definition at line 281 of file decNumberLocal.h.

#define EXPISSPECIAL (   exp)    ((exp)>=DECFLOAT_MinSp)

Definition at line 279 of file decNumberLocal.h.

#define Flag   uint8_t

Definition at line 58 of file decNumberLocal.h.

#define Int   int32_t

Definition at line 63 of file decNumberLocal.h.

#define ISZERO (   dn)    decNumberIsZero(dn)

Definition at line 215 of file decNumberLocal.h.

#define LONGMUL32HI (   w,
  u,
 
)
Value:
{             \
    uInt u0, u1, v0, v1, w0, w1, w2, t;      \
    u0=u & 0xffff; u1=u>>16;                 \
    v0=v & 0xffff; v1=v>>16;                 \
    w0=u0*v0;                                \
    t=u1*v0 + (w0>>16);                      \
    w1=t & 0xffff; w2=t>>16;                 \
    w1=u0*v1 + w1;                           \
    (w)=u1*v1 + w2 + (w1>>16);}

Definition at line 97 of file decNumberLocal.h.

#define MAXI (   x,
 
)    ((x)<(y)?(y):(x))

Definition at line 127 of file decNumberLocal.h.

#define MINI (   x,
 
)    ((x)>(y)?(y):(x))

Definition at line 128 of file decNumberLocal.h.

#define MSUDIGITS (   d)    ((d)-(D2U(d)-1)*DECDPUN)

Definition at line 231 of file decNumberLocal.h.

#define NUMISSPECIAL (   num)    (EXPISSPECIAL((num)->exponent))

Definition at line 282 of file decNumberLocal.h.

#define ROUNDDOWN (   i,
 
)    (((i)/n)*n)

Definition at line 111 of file decNumberLocal.h.

#define ROUNDDOWN4 (   i)    ((i)&~3)

Definition at line 112 of file decNumberLocal.h.

#define ROUNDUP (   i,
 
)    ((((i)+(n)-1)/n)*n)

Definition at line 108 of file decNumberLocal.h.

#define SD2U (   d)    (((d)+DECDPUN-1)/DECDPUN)

Definition at line 227 of file decNumberLocal.h.

#define Short   int16_t

Definition at line 61 of file decNumberLocal.h.

#define TODIGIT (   u,
  cut,
  c,
  pow 
)
Value:
{       \
    *(c)='0';                             \
    pow=DECPOWERS[cut]*2;                 \
    if ((u)>pow) {                        \
      pow*=4;                             \
      if ((u)>=pow) {(u)-=pow; *(c)+=8;}  \
      pow/=2;                             \
      if ((u)>=pow) {(u)-=pow; *(c)+=4;}  \
      pow/=2;                             \
      }                                   \
    if ((u)>=pow) {(u)-=pow; *(c)+=2;}    \
    pow/=2;                               \
    if ((u)>=pow) {(u)-=pow; *(c)+=1;}    \
    }

Definition at line 248 of file decNumberLocal.h.

#define uByte   uint8_t

Definition at line 60 of file decNumberLocal.h.

#define UBYTEAT (   b)    (*((uByte *)(b)))

Definition at line 119 of file decNumberLocal.h.

#define uInt   uint32_t

Definition at line 64 of file decNumberLocal.h.

#define UINTAT (   b)    (*((uInt *)(b)))

Definition at line 117 of file decNumberLocal.h.

#define Unit   decNumberUnit

Definition at line 65 of file decNumberLocal.h.

#define uShort   uint16_t

Definition at line 62 of file decNumberLocal.h.

#define USHORTAT (   b)    (*((uShort *)(b)))

Definition at line 118 of file decNumberLocal.h.

#define X10 (   i)    (((i)<<1)+((i)<<3))

Definition at line 123 of file decNumberLocal.h.

#define X100 (   i)    (((i)<<2)+((i)<<5)+((i)<<6))

Definition at line 124 of file decNumberLocal.h.


Typedef Documentation

typedef long int LI

Definition at line 72 of file decNumberLocal.h.


Variable Documentation

const uShort BCD2DPD[2458]
const uByte BIN2BCD8[4000]
const uShort BIN2DPD[1000]
const uByte d2utable[DECMAXD2U+1]
const uInt DECCOMBFROM[48]
const uInt DECCOMBMSD[64]
const uInt DECPOWERS[10]
const uByte DECSTICKYTAB[10]
const uByte DPD2BCD8[4096]
const uShort DPD2BIN[1024]
const uInt DPD2BINK[1024]
const uInt DPD2BINM[1024]