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)  

decNumber.cpp File Reference
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "cmemory.h"
#include "decNumber.h"
#include "decNumberLocal.h"
#include "uassert.h"
Include dependency graph for decNumber.cpp:

Go to the source code of this file.

Macros

#define DECVERB   1 /* set to 1 for verbose DECCHECK */
 
#define powers   DECPOWERS /* old internal name */
 
#define DIVIDE   0x80 /* Divide operators */
 
#define REMAINDER   0x40 /* .. */
 
#define DIVIDEINT   0x20 /* .. */
 
#define REMNEAR   0x10 /* .. */
 
#define COMPARE   0x01 /* Compare operators */
 
#define COMPMAX   0x02 /* .. */
 
#define COMPMIN   0x03 /* .. */
 
#define COMPTOTAL   0x04 /* .. */
 
#define COMPNAN   0x05 /* .. [NaN processing] */
 
#define COMPSIG   0x06 /* .. [signaling COMPARE] */
 
#define COMPMAXMAG   0x07 /* .. */
 
#define COMPMINMAG   0x08 /* .. */
 
#define DEC_sNaN   0x40000000 /* local status: sNaN signal */
 
#define BADINT   (Int)0x80000000 /* most-negative Int; error indicator */
 
#define BIGEVEN   (Int)0x80000002
 
#define BIGODD   (Int)0x80000003
 
#define eInt   Int /* extended integer */
 
#define ueInt   uInt /* unsigned extended integer */
 
#define QUOT10(u, n)   ((((uInt)(u)>>(n))*multies[n])>>17)
 
#define decFinish(a, b, c, d)   decFinalize(a,b,c,d)
 
#define SPECIALARG   (rhs->bits & DECSPECIAL)
 
#define SPECIALARGS   ((lhs->bits | rhs->bits) & DECSPECIAL)
 
#define malloc(a)   uprv_malloc(a)
 
#define free(a)   uprv_free(a)
 
#define FASTMUL   (DECUSE64 && DECDPUN<5)
 
#define FASTBASE   1000000000 /* base */
 
#define FASTDIGS   9 /* digits in base */
 
#define FASTLAZY   18 /* carry resolution point [1->18] */
 
#define NEEDTWO   (DECDPUN*2) /* within two decUnitAddSub calls */
 
#define LN10   "2.302585092994045684017991454684364207601"
 
#define LN2   "0.6931471805599453094172321214581765680755"
 

Functions

static decNumberdecAddOp (decNumber *, const decNumber *, const decNumber *, decContext *, uint8_t, uint32_t *)
 
static uint8_t decBiStr (const char *, const char *, const char *)
 
static uint32_t decCheckMath (const decNumber *, decContext *, uint32_t *)
 
static void decApplyRound (decNumber *, decContext *, int32_t, uint32_t *)
 
static int32_t decCompare (const decNumber *lhs, const decNumber *rhs, uint8_t)
 
static decNumberdecCompareOp (decNumber *, const decNumber *, const decNumber *, decContext *, uint8_t, uint32_t *)
 
static void decCopyFit (decNumber *, const decNumber *, decContext *, int32_t *, uint32_t *)
 
static decNumberdecDecap (decNumber *, int32_t)
 
static decNumberdecDivideOp (decNumber *, const decNumber *, const decNumber *, decContext *, uint8_t, uint32_t *)
 
static decNumberdecExpOp (decNumber *, const decNumber *, decContext *, uint32_t *)
 
static void decFinalize (decNumber *, decContext *, int32_t *, uint32_t *)
 
static int32_t decGetDigits (uint8_t *, int32_t)
 
static int32_t decGetInt (const decNumber *)
 
static decNumberdecLnOp (decNumber *, const decNumber *, decContext *, uint32_t *)
 
static decNumberdecMultiplyOp (decNumber *, const decNumber *, const decNumber *, decContext *, uint32_t *)
 
static decNumberdecNaNs (decNumber *, const decNumber *, const decNumber *, decContext *, uint32_t *)
 
static decNumberdecQuantizeOp (decNumber *, const decNumber *, const decNumber *, decContext *, uint8_t, uint32_t *)
 
static void decReverse (uint8_t *, uint8_t *)
 
static void decSetCoeff (decNumber *, decContext *, const uint8_t *, int32_t, int32_t *, uint32_t *)
 
static void decSetMaxValue (decNumber *, decContext *)
 
static void decSetOverflow (decNumber *, decContext *, uint32_t *)
 
static void decSetSubnormal (decNumber *, decContext *, int32_t *, uint32_t *)
 
static int32_t decShiftToLeast (uint8_t *, int32_t, int32_t)
 
static int32_t decShiftToMost (uint8_t *, int32_t, int32_t)
 
static void decStatus (decNumber *, uint32_t, decContext *)
 
static void decToString (const decNumber *, char[], uint8_t)
 
static decNumberdecTrim (decNumber *, decContext *, uint8_t, uint8_t, int32_t *)
 
static int32_t decUnitAddSub (const uint8_t *, int32_t, const uint8_t *, int32_t, int32_t, uint8_t *, int32_t)
 
static int32_t decUnitCompare (const uint8_t *, int32_t, const uint8_t *, int32_t, int32_t)
 
decNumberuprv_decNumberFromInt32_68 (decNumber *dn, int32_t in)
 
decNumberuprv_decNumberFromUInt32_68 (decNumber *dn, uint32_t uin)
 
int32_t uprv_decNumberToInt32_68 (const decNumber *dn, decContext *set)
 
uint32_t uprv_decNumberToUInt32_68 (const decNumber *dn, decContext *set)
 
char * uprv_decNumberToString_68 (const decNumber *dn, char *string)
 
char * uprv_decNumberToEngString_68 (const decNumber *dn, char *string)
 
decNumberuprv_decNumberFromString_68 (decNumber *dn, const char chars[], decContext *set)
 
decNumberuprv_decNumberAbs_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberAdd_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberAnd_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberCompare_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberCompareSignal_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberCompareTotal_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberCompareTotalMag_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberDivide_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberDivideInteger_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberExp_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberFMA_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, const decNumber *fhs, decContext *set)
 
decNumberuprv_decNumberInvert_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberLn_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberLogB_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberLog10_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberMax_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberMaxMag_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberMin_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberMinMag_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberMinus_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberNextMinus_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberNextPlus_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberNextToward_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberOr_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberPlus_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberMultiply_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberPower_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberQuantize_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberNormalize_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberReduce_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberRescale_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberRemainder_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberRemainderNear_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberRotate_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberSameQuantum_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs)
 
decNumberuprv_decNumberScaleB_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberShift_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberSquareRoot_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberSubtract_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberToIntegralExact_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberToIntegralValue_68 (decNumber *res, const decNumber *rhs, decContext *set)
 
decNumberuprv_decNumberXor_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs, decContext *set)
 
enum decClass uprv_decNumberClass (const decNumber *dn, decContext *set)
 
const char * uprv_decNumberClassToString_68 (enum decClass eclass)
 
decNumberuprv_decNumberCopy_68 (decNumber *dest, const decNumber *src)
 
decNumberuprv_decNumberCopyAbs_68 (decNumber *res, const decNumber *rhs)
 
decNumberuprv_decNumberCopyNegate_68 (decNumber *res, const decNumber *rhs)
 
decNumberuprv_decNumberCopySign_68 (decNumber *res, const decNumber *lhs, const decNumber *rhs)
 
uint8_tuprv_decNumberGetBCD_68 (const decNumber *dn, uint8_t *bcd)
 
decNumberuprv_decNumberSetBCD_68 (decNumber *dn, const uint8_t *bcd, uint32_t n)
 
int32_t uprv_decNumberIsNormal_68 (const decNumber *dn, decContext *set)
 
int32_t uprv_decNumberIsSubnormal_68 (const decNumber *dn, decContext *set)
 
decNumberuprv_decNumberTrim_68 (decNumber *dn)
 
const char * uprv_decNumberVersion_68 (void)
 
decNumberuprv_decNumberZero_68 (decNumber *dn)
 
static void decToString (const decNumber *dn, char *string, uint8_t eng)
 

Variables

static const uint8_t d2utable [49+1] =D2UTABLE
 
static const uint8_t uarrone [1] ={1}
 
static const uint32_t DECPOWERS [10]
 
static const uint32_t multies [] ={131073, 26215, 5243, 1049, 210}
 
static const uint16_t LNnn [90]
 
static const uint8_t resmap [10] ={0, 3, 3, 3, 3, 5, 7, 7, 7, 7}
 

Macro Definition Documentation

◆ BADINT

#define BADINT   (Int)0x80000000 /* most-negative Int; error indicator */

Definition at line 210 of file decNumber.cpp.

◆ BIGEVEN

#define BIGEVEN   (Int)0x80000002

Definition at line 212 of file decNumber.cpp.

◆ BIGODD

#define BIGODD   (Int)0x80000003

Definition at line 213 of file decNumber.cpp.

◆ COMPARE

#define COMPARE   0x01 /* Compare operators */

Definition at line 200 of file decNumber.cpp.

◆ COMPMAX

#define COMPMAX   0x02 /* .. */

Definition at line 201 of file decNumber.cpp.

◆ COMPMAXMAG

#define COMPMAXMAG   0x07 /* .. */

Definition at line 206 of file decNumber.cpp.

◆ COMPMIN

#define COMPMIN   0x03 /* .. */

Definition at line 202 of file decNumber.cpp.

◆ COMPMINMAG

#define COMPMINMAG   0x08 /* .. */

Definition at line 207 of file decNumber.cpp.

◆ COMPNAN

#define COMPNAN   0x05 /* .. [NaN processing] */

Definition at line 204 of file decNumber.cpp.

◆ COMPSIG

#define COMPSIG   0x06 /* .. [signaling COMPARE] */

Definition at line 205 of file decNumber.cpp.

◆ COMPTOTAL

#define COMPTOTAL   0x04 /* .. */

Definition at line 203 of file decNumber.cpp.

◆ DEC_sNaN

#define DEC_sNaN   0x40000000 /* local status: sNaN signal */

Definition at line 209 of file decNumber.cpp.

◆ decFinish

#define decFinish (   a,
  b,
  c,
  d 
)    decFinalize(a,b,c,d)

Definition at line 297 of file decNumber.cpp.

◆ DECVERB

#define DECVERB   1 /* set to 1 for verbose DECCHECK */

Definition at line 192 of file decNumber.cpp.

◆ DIVIDE

#define DIVIDE   0x80 /* Divide operators */

Definition at line 196 of file decNumber.cpp.

◆ DIVIDEINT

#define DIVIDEINT   0x20 /* .. */

Definition at line 198 of file decNumber.cpp.

◆ eInt

#define eInt   Int /* extended integer */

Definition at line 233 of file decNumber.cpp.

◆ FASTBASE

#define FASTBASE   1000000000 /* base */

◆ FASTDIGS

#define FASTDIGS   9 /* digits in base */

◆ FASTLAZY

#define FASTLAZY   18 /* carry resolution point [1->18] */

◆ FASTMUL

#define FASTMUL   (DECUSE64 && DECDPUN<5)

Definition at line 4871 of file decNumber.cpp.

◆ free

#define free (   a)    uprv_free(a)

Definition at line 310 of file decNumber.cpp.

◆ LN10

#define LN10   "2.302585092994045684017991454684364207601"

◆ LN2

#define LN2   "0.6931471805599453094172321214581765680755"

◆ malloc

#define malloc (   a)    uprv_malloc(a)

Definition at line 309 of file decNumber.cpp.

◆ NEEDTWO

#define NEEDTWO   (DECDPUN*2) /* within two decUnitAddSub calls */

◆ powers

#define powers   DECPOWERS /* old internal name */

Definition at line 193 of file decNumber.cpp.

◆ QUOT10

#define QUOT10 (   u,
  n 
)    ((((uInt)(u)>>(n))*multies[n])>>17)

Definition at line 240 of file decNumber.cpp.

◆ REMAINDER

#define REMAINDER   0x40 /* .. */

Definition at line 197 of file decNumber.cpp.

◆ REMNEAR

#define REMNEAR   0x10 /* .. */

Definition at line 199 of file decNumber.cpp.

◆ SPECIALARG

#define SPECIALARG   (rhs->bits & DECSPECIAL)

Definition at line 305 of file decNumber.cpp.

◆ SPECIALARGS

#define SPECIALARGS   ((lhs->bits | rhs->bits) & DECSPECIAL)

Definition at line 306 of file decNumber.cpp.

◆ ueInt

#define ueInt   uInt /* unsigned extended integer */

Definition at line 234 of file decNumber.cpp.

Function Documentation

◆ decAddOp()

◆ decApplyRound()

◆ decBiStr()

static uint8_t decBiStr ( const char *  targ,
const char *  str1,
const char *  str2 
)
static

Definition at line 7714 of file decNumber.cpp.

References str1, and str2.

Referenced by uprv_decNumberFromString_68().

◆ decCheckMath()

◆ decCompare()

◆ decCompareOp()

◆ decCopyFit()

◆ decDecap()

static decNumber * decDecap ( decNumber dn,
int32_t  drop 
)
static

Definition at line 7678 of file decNumber.cpp.

References D2U, DECDPUN, decGetDigits(), dn, MSUDIGITS, printf(), and Unit.

Referenced by decNaNs(), and uprv_decNumberShift_68().

◆ decDivideOp()

◆ decExpOp()

◆ decFinalize()

◆ decGetDigits()

◆ decGetInt()

◆ decLnOp()

◆ decMultiplyOp()

◆ decNaNs()

◆ decQuantizeOp()

◆ decReverse()

static void decReverse ( uint8_t ulo,
uint8_t uhi 
)
static

Definition at line 6708 of file decNumber.cpp.

References temp, and Unit.

Referenced by uprv_decNumberRotate_68().

◆ decSetCoeff()

static void decSetCoeff ( decNumber dn,
decContext set,
const uint8_t lsu,
int32_t  len,
int32_t residue,
uint32_t status 
)
static

◆ decSetMaxValue()

static void decSetMaxValue ( decNumber dn,
decContext set 
)
static

◆ decSetOverflow()

◆ decSetSubnormal()

◆ decShiftToLeast()

static int32_t decShiftToLeast ( uint8_t uar,
int32_t  units,
int32_t  shift 
)
static

◆ decShiftToMost()

static int32_t decShiftToMost ( uint8_t uar,
int32_t  digits,
int32_t  shift 
)
static

◆ decStatus()

◆ decToString() [1/2]

static void decToString ( const decNumber ,
char  [],
uint8_t   
)
static

◆ decToString() [2/2]

static void decToString ( const decNumber dn,
char *  string,
uint8_t  eng 
)
static

◆ decTrim()

◆ decUnitAddSub()

static int32_t decUnitAddSub ( const uint8_t a,
int32_t  alength,
const uint8_t b,
int32_t  blength,
int32_t  bshift,
uint8_t c,
int32_t  m 
)
static

Definition at line 6383 of file decNumber.cpp.

References a, add, b, c, DECDPUN, eInt, hold, m, printf(), QUOT10, ueInt, and Unit.

Referenced by decAddOp(), decApplyRound(), decDivideOp(), decMultiplyOp(), and decUnitCompare().

◆ decUnitCompare()

static int32_t decUnitCompare ( const uint8_t a,
int32_t  alength,
const uint8_t b,
int32_t  blength,
int32_t  exp 
)
static

◆ uprv_decNumberAbs_68()

decNumber* uprv_decNumberAbs_68 ( decNumber res,
const decNumber rhs,
decContext set 
)

◆ uprv_decNumberAdd_68()

decNumber* uprv_decNumberAdd_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 795 of file decNumber.cpp.

References decAddOp(), decStatus(), res, and status.

◆ uprv_decNumberAnd_68()

◆ uprv_decNumberClass()

◆ uprv_decNumberClassToString_68()

◆ uprv_decNumberCompare_68()

decNumber* uprv_decNumberCompare_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 889 of file decNumber.cpp.

References COMPARE, decCompareOp(), decStatus(), res, and status.

◆ uprv_decNumberCompareSignal_68()

decNumber* uprv_decNumberCompareSignal_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 909 of file decNumber.cpp.

References COMPSIG, decCompareOp(), decStatus(), res, and status.

◆ uprv_decNumberCompareTotal_68()

decNumber* uprv_decNumberCompareTotal_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 930 of file decNumber.cpp.

References COMPTOTAL, decCompareOp(), decStatus(), res, and status.

◆ uprv_decNumberCompareTotalMag_68()

decNumber* uprv_decNumberCompareTotalMag_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

◆ uprv_decNumberCopy_68()

decNumber* uprv_decNumberCopy_68 ( decNumber dest,
const decNumber src 
)

Definition at line 3385 of file decNumber.cpp.

References d, D2U, DECDPUN, dest, NULL, s, link_confs::src, Unit, and uprv_decNumberZero.

◆ uprv_decNumberCopyAbs_68()

decNumber* uprv_decNumberCopyAbs_68 ( decNumber res,
const decNumber rhs 
)

Definition at line 3425 of file decNumber.cpp.

References res, and uprv_decNumberCopy.

◆ uprv_decNumberCopyNegate_68()

decNumber* uprv_decNumberCopyNegate_68 ( decNumber res,
const decNumber rhs 
)

Definition at line 3446 of file decNumber.cpp.

References DECNEG, res, and uprv_decNumberCopy.

◆ uprv_decNumberCopySign_68()

decNumber* uprv_decNumberCopySign_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs 
)

Definition at line 3467 of file decNumber.cpp.

References decNumber::bits, DECNEG, res, sign, uByte, and uprv_decNumberCopy.

◆ uprv_decNumberDivide_68()

decNumber* uprv_decNumberDivide_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 1016 of file decNumber.cpp.

References decDivideOp(), decStatus(), DIVIDE, res, and status.

◆ uprv_decNumberDivideInteger_68()

decNumber* uprv_decNumberDivideInteger_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 1039 of file decNumber.cpp.

References decDivideOp(), decStatus(), DIVIDEINT, res, and status.

◆ uprv_decNumberExp_68()

decNumber* uprv_decNumberExp_68 ( decNumber res,
const decNumber rhs,
decContext set 
)

◆ uprv_decNumberFMA_68()

◆ uprv_decNumberFromInt32_68()

decNumber* uprv_decNumberFromInt32_68 ( decNumber dn,
int32_t  in 
)

Definition at line 368 of file decNumber.cpp.

References BADINT, DECNEG, dn, in, uInt, and uprv_decNumberFromUInt32.

◆ uprv_decNumberFromString_68()

◆ uprv_decNumberFromUInt32_68()

decNumber* uprv_decNumberFromUInt32_68 ( decNumber dn,
uint32_t  uin 
)

Definition at line 381 of file decNumber.cpp.

References decGetDigits(), dn, Unit, up, and uprv_decNumberZero.

◆ uprv_decNumberGetBCD_68()

uint8_t* uprv_decNumberGetBCD_68 ( const decNumber dn,
uint8_t bcd 
)

Definition at line 3490 of file decNumber.cpp.

References DECDPUN, dn, u, uByte, Unit, and up.

◆ uprv_decNumberInvert_68()

◆ uprv_decNumberIsNormal_68()

int32_t uprv_decNumberIsNormal_68 ( const decNumber dn,
decContext set 
)

Definition at line 3549 of file decNumber.cpp.

References decNumberIsSpecial, decNumberIsZero, and dn.

◆ uprv_decNumberIsSubnormal_68()

int32_t uprv_decNumberIsSubnormal_68 ( const decNumber dn,
decContext set 
)

Definition at line 3569 of file decNumber.cpp.

References decNumberIsSpecial, decNumberIsZero, and dn.

◆ uprv_decNumberLn_68()

decNumber* uprv_decNumberLn_68 ( decNumber res,
const decNumber rhs,
decContext set 
)

◆ uprv_decNumberLog10_68()

◆ uprv_decNumberLogB_68()

◆ uprv_decNumberMax_68()

decNumber* uprv_decNumberMax_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 1569 of file decNumber.cpp.

References COMPMAX, decCompareOp(), decStatus(), res, and status.

◆ uprv_decNumberMaxMag_68()

decNumber* uprv_decNumberMaxMag_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 1592 of file decNumber.cpp.

References COMPMAXMAG, decCompareOp(), decStatus(), res, and status.

◆ uprv_decNumberMin_68()

decNumber* uprv_decNumberMin_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 1615 of file decNumber.cpp.

References COMPMIN, decCompareOp(), decStatus(), res, and status.

◆ uprv_decNumberMinMag_68()

decNumber* uprv_decNumberMinMag_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 1638 of file decNumber.cpp.

References COMPMINMAG, decCompareOp(), decStatus(), res, and status.

◆ uprv_decNumberMinus_68()

decNumber* uprv_decNumberMinus_68 ( decNumber res,
const decNumber rhs,
decContext set 
)

Definition at line 1663 of file decNumber.cpp.

References decAddOp(), DECNEG, decStatus(), decNumber::exponent, res, status, and uprv_decNumberZero.

◆ uprv_decNumberMultiply_68()

decNumber* uprv_decNumberMultiply_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 1937 of file decNumber.cpp.

References decMultiplyOp(), decStatus(), res, and status.

◆ uprv_decNumberNextMinus_68()

◆ uprv_decNumberNextPlus_68()

◆ uprv_decNumberNextToward_68()

◆ uprv_decNumberNormalize_68()

decNumber* uprv_decNumberNormalize_68 ( decNumber res,
const decNumber rhs,
decContext set 
)

Definition at line 2339 of file decNumber.cpp.

References uprv_decNumberReduce.

◆ uprv_decNumberOr_68()

◆ uprv_decNumberPlus_68()

decNumber* uprv_decNumberPlus_68 ( decNumber res,
const decNumber rhs,
decContext set 
)

Definition at line 1907 of file decNumber.cpp.

References decAddOp(), decStatus(), decNumber::exponent, res, status, and uprv_decNumberZero.

◆ uprv_decNumberPower_68()

◆ uprv_decNumberQuantize_68()

decNumber* uprv_decNumberQuantize_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 2319 of file decNumber.cpp.

References decQuantizeOp(), decStatus(), res, and status.

◆ uprv_decNumberReduce_68()

decNumber* uprv_decNumberReduce_68 ( decNumber res,
const decNumber rhs,
decContext set 
)

◆ uprv_decNumberRemainder_68()

decNumber* uprv_decNumberRemainder_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 2428 of file decNumber.cpp.

References decDivideOp(), decStatus(), REMAINDER, res, and status.

◆ uprv_decNumberRemainderNear_68()

decNumber* uprv_decNumberRemainderNear_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 2451 of file decNumber.cpp.

References decDivideOp(), decStatus(), REMNEAR, res, and status.

◆ uprv_decNumberRescale_68()

decNumber* uprv_decNumberRescale_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 2408 of file decNumber.cpp.

References decQuantizeOp(), decStatus(), res, and status.

◆ uprv_decNumberRotate_68()

◆ uprv_decNumberSameQuantum_68()

decNumber* uprv_decNumberSameQuantum_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs 
)

◆ uprv_decNumberScaleB_68()

◆ uprv_decNumberSetBCD_68()

decNumber* uprv_decNumberSetBCD_68 ( decNumber dn,
const uint8_t bcd,
uint32_t  n 
)

Definition at line 3524 of file decNumber.cpp.

References D2U, DECDPUN, dn, MSUDIGITS, n, uByte, Unit, up, and X10.

◆ uprv_decNumberShift_68()

◆ uprv_decNumberSquareRoot_68()

◆ uprv_decNumberSubtract_68()

decNumber* uprv_decNumberSubtract_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 3178 of file decNumber.cpp.

References decAddOp(), DECNEG, decStatus(), res, and status.

◆ uprv_decNumberToEngString_68()

char* uprv_decNumberToEngString_68 ( const decNumber dn,
char *  string 
)

Definition at line 487 of file decNumber.cpp.

References decToString(), dn, and string.

◆ uprv_decNumberToInt32_68()

int32_t uprv_decNumberToInt32_68 ( const decNumber dn,
decContext set 
)

Definition at line 403 of file decNumber.cpp.

References d, DEC_Invalid_operation, DECDPUN, DECNEG, DECSPECIAL, dn, i, Unit, up, uprv_decContextSetStatus, and X10.

◆ uprv_decNumberToIntegralExact_68()

◆ uprv_decNumberToIntegralValue_68()

decNumber* uprv_decNumberToIntegralValue_68 ( decNumber res,
const decNumber rhs,
decContext set 
)

◆ uprv_decNumberToString_68()

char* uprv_decNumberToString_68 ( const decNumber dn,
char *  string 
)

Definition at line 482 of file decNumber.cpp.

References decToString(), dn, and string.

◆ uprv_decNumberToUInt32_68()

uint32_t uprv_decNumberToUInt32_68 ( const decNumber dn,
decContext set 
)

Definition at line 439 of file decNumber.cpp.

References d, DEC_Invalid_operation, DECDPUN, DECNEG, DECSPECIAL, dn, ISZERO, Unit, up, uprv_decContextSetStatus, and X10.

◆ uprv_decNumberTrim_68()

decNumber* uprv_decNumberTrim_68 ( decNumber dn)

Definition at line 3593 of file decNumber.cpp.

References DEC_INIT_BASE, decTrim(), dn, and uprv_decContextDefault.

◆ uprv_decNumberVersion_68()

const char* uprv_decNumberVersion_68 ( void  )

Definition at line 3608 of file decNumber.cpp.

References DECVERSION.

◆ uprv_decNumberXor_68()

decNumber* uprv_decNumberXor_68 ( decNumber res,
const decNumber lhs,
const decNumber rhs,
decContext set 
)

Definition at line 3267 of file decNumber.cpp.

◆ uprv_decNumberZero_68()

decNumber* uprv_decNumberZero_68 ( decNumber dn)

Definition at line 3621 of file decNumber.cpp.

References dn.

Variable Documentation

◆ d2utable

const uint8_t d2utable[49+1] =D2UTABLE
static

Definition at line 190 of file decNumber.cpp.

◆ DECPOWERS

const uint32_t DECPOWERS[10]
static
Initial value:
={1, 10, 100, 1000, 10000, 100000, 1000000,
10000000, 100000000, 1000000000}

Definition at line 227 of file decNumber.cpp.

◆ LNnn

const uint16_t LNnn[90]
static
Initial value:
={9016, 8652, 8316, 8008, 7724, 7456, 7208,
6972, 6748, 6540, 6340, 6148, 5968, 5792, 5628, 5464, 5312,
5164, 5020, 4884, 4748, 4620, 4496, 4376, 4256, 4144, 4032,
39233, 38181, 37157, 36157, 35181, 34229, 33297, 32389, 31501, 30629,
29777, 28945, 28129, 27329, 26545, 25777, 25021, 24281, 23553, 22837,
22137, 21445, 20769, 20101, 19445, 18801, 18165, 17541, 16925, 16321,
15721, 15133, 14553, 13985, 13421, 12865, 12317, 11777, 11241, 10717,
10197, 9685, 9177, 8677, 8185, 7697, 7213, 6737, 6269, 5801,
5341, 4889, 4437, 39930, 35534, 31186, 26886, 22630, 18418, 14254,
10130, 6046, 20055}

Definition at line 5554 of file decNumber.cpp.

Referenced by decLnOp().

◆ multies

const uint32_t multies[] ={131073, 26215, 5243, 1049, 210}
static

Definition at line 238 of file decNumber.cpp.

◆ resmap

const uint8_t resmap[10] ={0, 3, 3, 3, 3, 5, 7, 7, 7, 7}
static

Definition at line 6934 of file decNumber.cpp.

Referenced by decSetCoeff().

◆ uarrone

const uint8_t uarrone[1] ={1}
static

Definition at line 215 of file decNumber.cpp.

Referenced by decApplyRound().