w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

decNumberLocal.h File Reference
#include <stdlib.h>
#include <string.h>
#include "decContext.h"
Include dependency graph for decNumberLocal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  bcdnum
 

Macros

#define DECVERSION   "decNumber 3.61" /* Package Version [16 max.] */
 
#define DECNLAUTHOR   "Mike Cowlishaw" /* Who to blame */
 
#define DECLITEND   1 /* 1=little-endian, 0=big-endian */
 
#define DECUSE64   1 /* 1=use int64s, 0=int32 & smaller only */
 
#define DECCHECK   0 /* 1 to enable robust checking */
 
#define DECALLOC   0 /* 1 to enable memory accounting */
 
#define DECTRACE   0 /* 1 to trace certain internals, etc. */
 
#define DECBUFFER   36 /* Size basis for local buffers. This */
 
#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 Long   int64_t
 
#define uLong   uint64_t
 
#define DECNOINT   0 /* 1 to check no internal use of 'int' */
 
#define LONGMUL32HI(w, u, v)
 
#define ROUNDUP(i, n)   ((((i)+(n)-1)/n)*n)
 
#define ROUNDUP4(i)   (((i)+3)&~3) /* special for n=4 */
 
#define ROUNDDOWN(i, n)   (((i)/n)*n)
 
#define ROUNDDOWN4(i)   ((i)&~3) /* special for n=4 */
 
#define UBTOUS(b)   (memcpy((void *)&uswork, b, 2), uswork)
 
#define UBTOUI(b)   (memcpy((void *)&uiwork, b, 4), uiwork)
 
#define UBFROMUS(b, i)   (uswork=(i), memcpy(b, (void *)&uswork, 2), uswork)
 
#define UBFROMUI(b, i)   (uiwork=(i), memcpy(b, (void *)&uiwork, 4), uiwork)
 
#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 /* 10**9 */
 
#define CHARMASK   ((((((((uInt)'0')<<8)+'0')<<8)+'0')<<8)+'0')
 
#define DECNUMMAXP   999999999 /* maximum precision code can handle */
 
#define DECNUMMAXE   999999999 /* maximum adjusted exponent ditto */
 
#define DECNUMMINE   -999999999 /* minimum adjusted exponent ditto */
 
#define DECMAXD2U   49
 
#define ISZERO(dn)   decNumberIsZero(dn) /* now just a local name */
 
#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 DFBYTE(df, off)   ((df)->bytes[DECBYTES-1-(off)])
 
#define DFWORD(df, off)   ((df)->words[DECWORDS-1-(off)])
 
#define DFWWORD(dfw, off)   ((dfw)->words[DECWWORDS-1-(off)])
 
#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 uint32_t DECCOMBMSD [64]
 
const uint32_t DECCOMBFROM [48]
 

Macro Definition Documentation

◆ BILLION

#define BILLION   1000000000 /* 10**9 */

Definition at line 143 of file decNumberLocal.h.

◆ Byte

Definition at line 72 of file decNumberLocal.h.

◆ CHARMASK

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

Definition at line 145 of file decNumberLocal.h.

◆ D2N

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

Definition at line 252 of file decNumberLocal.h.

◆ D2U

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

Definition at line 238 of file decNumberLocal.h.

◆ DECALLOC

#define DECALLOC   0 /* 1 to enable memory accounting */

Definition at line 51 of file decNumberLocal.h.

◆ DECBUFFER

#define DECBUFFER   36 /* Size basis for local buffers. This */

Definition at line 59 of file decNumberLocal.h.

◆ DECCHECK

#define DECCHECK   0 /* 1 to enable robust checking */

Definition at line 48 of file decNumberLocal.h.

◆ DECLITEND

#define DECLITEND   1 /* 1=little-endian, 0=big-endian */

Definition at line 38 of file decNumberLocal.h.

◆ DECMAXD2U

#define DECMAXD2U   49

Definition at line 223 of file decNumberLocal.h.

◆ DECNLAUTHOR

#define DECNLAUTHOR   "Mike Cowlishaw" /* Who to blame */

Definition at line 30 of file decNumberLocal.h.

◆ DECNOINT

#define DECNOINT   0 /* 1 to check no internal use of 'int' */

Definition at line 86 of file decNumberLocal.h.

◆ DECNUMMAXE

#define DECNUMMAXE   999999999 /* maximum adjusted exponent ditto */

Definition at line 155 of file decNumberLocal.h.

◆ DECNUMMAXP

#define DECNUMMAXP   999999999 /* maximum precision code can handle */

Definition at line 154 of file decNumberLocal.h.

◆ DECNUMMINE

#define DECNUMMINE   -999999999 /* minimum adjusted exponent ditto */

Definition at line 156 of file decNumberLocal.h.

◆ DECTRACE

#define DECTRACE   0 /* 1 to trace certain internals, etc. */

Definition at line 54 of file decNumberLocal.h.

◆ DECUSE64

#define DECUSE64   1 /* 1=use int64s, 0=int32 & smaller only */

Definition at line 43 of file decNumberLocal.h.

◆ DECVERSION

#define DECVERSION   "decNumber 3.61" /* Package Version [16 max.] */

Definition at line 29 of file decNumberLocal.h.

◆ DECWORDS

#define DECWORDS   (DECBYTES/4)

Definition at line 302 of file decNumberLocal.h.

◆ DECWWORDS

#define DECWWORDS   (DECWBYTES/4)

Definition at line 303 of file decNumberLocal.h.

◆ DFBYTE

#define DFBYTE (   df,
  off 
)    ((df)->bytes[DECBYTES-1-(off)])

Definition at line 305 of file decNumberLocal.h.

◆ DFISINF

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

Definition at line 317 of file decNumberLocal.h.

◆ DFISNAN

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

Definition at line 318 of file decNumberLocal.h.

◆ DFISQNAN

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

Definition at line 319 of file decNumberLocal.h.

◆ DFISSIGNED

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

Definition at line 315 of file decNumberLocal.h.

◆ DFISSNAN

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

Definition at line 320 of file decNumberLocal.h.

◆ DFISSPECIAL

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

Definition at line 316 of file decNumberLocal.h.

◆ DFWORD

#define DFWORD (   df,
  off 
)    ((df)->words[DECWORDS-1-(off)])

Definition at line 306 of file decNumberLocal.h.

◆ DFWWORD

#define DFWWORD (   dfw,
  off 
)    ((dfw)->words[DECWWORDS-1-(off)])

Definition at line 307 of file decNumberLocal.h.

◆ EXPISINF

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

Definition at line 294 of file decNumberLocal.h.

◆ EXPISNAN

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

Definition at line 295 of file decNumberLocal.h.

◆ EXPISSPECIAL

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

Definition at line 293 of file decNumberLocal.h.

◆ Flag

#define Flag   uint8_t

Definition at line 71 of file decNumberLocal.h.

◆ Int

Definition at line 76 of file decNumberLocal.h.

◆ ISZERO

#define ISZERO (   dn)    decNumberIsZero(dn) /* now just a local name */

Definition at line 229 of file decNumberLocal.h.

◆ Long

Definition at line 80 of file decNumberLocal.h.

◆ LONGMUL32HI

#define LONGMUL32HI (   w,
  u,
  v 
)
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);}
#define w1
int w
Definition: dviconv.c:26
int v
Definition: dviconv.c:10
#define v0
#define v1
#define t
Definition: afcover.h:96
#define w0
#define w2
small capitals from c petite p scientific f u
Definition: afcover.h:88
Definition: dvips.h:235

Definition at line 99 of file decNumberLocal.h.

◆ MAXI

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

Definition at line 139 of file decNumberLocal.h.

◆ MINI

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

Definition at line 140 of file decNumberLocal.h.

◆ MSUDIGITS

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

Definition at line 245 of file decNumberLocal.h.

◆ NUMISSPECIAL

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

Definition at line 296 of file decNumberLocal.h.

◆ ROUNDDOWN

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

Definition at line 114 of file decNumberLocal.h.

◆ ROUNDDOWN4

#define ROUNDDOWN4 (   i)    ((i)&~3) /* special for n=4 */

Definition at line 115 of file decNumberLocal.h.

◆ ROUNDUP

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

Definition at line 110 of file decNumberLocal.h.

◆ ROUNDUP4

#define ROUNDUP4 (   i)    (((i)+3)&~3) /* special for n=4 */

Definition at line 111 of file decNumberLocal.h.

◆ SD2U

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

Definition at line 241 of file decNumberLocal.h.

◆ Short

Definition at line 74 of file decNumberLocal.h.

◆ TODIGIT

#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;} \
double __cdecl pow(double _X, double _Y)
#define c(n)
Definition: gpos-common.c:150
const uint32_t DECPOWERS[10]
Definition: decContext.c:41
#define UPRV_BLOCK_MACRO_END
Definition: umachine.h:178
#define UPRV_BLOCK_MACRO_BEGIN
Definition: umachine.h:169

Definition at line 262 of file decNumberLocal.h.

◆ UBFROMUI

#define UBFROMUI (   b,
  i 
)    (uiwork=(i), memcpy(b, (void *)&uiwork, 4), uiwork)

Definition at line 131 of file decNumberLocal.h.

◆ UBFROMUS

#define UBFROMUS (   b,
  i 
)    (uswork=(i), memcpy(b, (void *)&uswork, 2), uswork)

Definition at line 130 of file decNumberLocal.h.

◆ UBTOUI

#define UBTOUI (   b)    (memcpy((void *)&uiwork, b, 4), uiwork)

Definition at line 125 of file decNumberLocal.h.

◆ UBTOUS

#define UBTOUS (   b)    (memcpy((void *)&uswork, b, 2), uswork)

Definition at line 124 of file decNumberLocal.h.

◆ uByte

#define uByte   uint8_t

Definition at line 73 of file decNumberLocal.h.

◆ uInt

Definition at line 77 of file decNumberLocal.h.

◆ uLong

Definition at line 81 of file decNumberLocal.h.

◆ Unit

#define Unit   decNumberUnit

Definition at line 78 of file decNumberLocal.h.

◆ uShort

#define uShort   uint16_t

Definition at line 75 of file decNumberLocal.h.

◆ X10

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

Definition at line 135 of file decNumberLocal.h.

◆ X100

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

Definition at line 136 of file decNumberLocal.h.

Typedef Documentation

◆ LI

typedef long int LI

Definition at line 85 of file decNumberLocal.h.

Variable Documentation

◆ DECCOMBFROM

const uint32_t DECCOMBFROM[48]
extern

◆ DECCOMBMSD

const uint32_t DECCOMBMSD[64]
extern