U_LONG 180 ext/bigdecimal/bigdecimal.c static void VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v); U_LONG 181 ext/bigdecimal/bigdecimal.c static int VpLimitRound(Real *c,U_LONG ixDigit); U_LONG 293 ext/bigdecimal/bigdecimal.c U_LONG hash,i; U_LONG 296 ext/bigdecimal/bigdecimal.c hash = (U_LONG)p->sign; U_LONG 451 ext/bigdecimal/bigdecimal.c static U_LONG U_LONG 454 ext/bigdecimal/bigdecimal.c U_LONG mxs; U_LONG 455 ext/bigdecimal/bigdecimal.c U_LONG mx = a->Prec; U_LONG 464 ext/bigdecimal/bigdecimal.c mx = mx+(U_LONG)d; U_LONG 485 ext/bigdecimal/bigdecimal.c VpNewRbClass(U_LONG mx, char *str, VALUE klass) U_LONG 493 ext/bigdecimal/bigdecimal.c VpCreateRbObject(U_LONG mx, const char *str) U_LONG 550 ext/bigdecimal/bigdecimal.c U_LONG v,b,j; U_LONG 709 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 747 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 926 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 945 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1006 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1077 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1177 ext/bigdecimal/bigdecimal.c U_LONG ix = (U_LONG)GetPositiveInt(n); U_LONG 1182 ext/bigdecimal/bigdecimal.c U_LONG mx = (ix+VpBaseFig()*2); U_LONG 1183 ext/bigdecimal/bigdecimal.c U_LONG pl = VpSetPrecLimit(0); U_LONG 1204 ext/bigdecimal/bigdecimal.c U_LONG mx = (U_LONG)GetPositiveInt(n); U_LONG 1207 ext/bigdecimal/bigdecimal.c U_LONG pl = VpSetPrecLimit(0); U_LONG 1221 ext/bigdecimal/bigdecimal.c U_LONG mx = (U_LONG)GetPositiveInt(n); U_LONG 1224 ext/bigdecimal/bigdecimal.c U_LONG pl = VpSetPrecLimit(0); U_LONG 1238 ext/bigdecimal/bigdecimal.c U_LONG mx = (U_LONG)GetPositiveInt(n); U_LONG 1241 ext/bigdecimal/bigdecimal.c U_LONG pl = VpSetPrecLimit(0); U_LONG 1261 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1302 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1339 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1342 ext/bigdecimal/bigdecimal.c U_LONG pl; U_LONG 1401 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1403 ext/bigdecimal/bigdecimal.c U_LONG pl = VpSetPrecLimit(0); U_LONG 1427 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1460 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1463 ext/bigdecimal/bigdecimal.c U_LONG pl = VpSetPrecLimit(0); U_LONG 1504 ext/bigdecimal/bigdecimal.c U_LONG mx; U_LONG 1507 ext/bigdecimal/bigdecimal.c U_LONG pl = VpSetPrecLimit(0); U_LONG 1564 ext/bigdecimal/bigdecimal.c U_LONG nc; U_LONG 1852 ext/bigdecimal/bigdecimal.c VpInit((U_LONG)0); U_LONG 2042 ext/bigdecimal/bigdecimal.c static U_LONG gnPrecLimit = 0; /* Global upper limit of the precision newly allocated */ U_LONG 2043 ext/bigdecimal/bigdecimal.c static U_LONG gfRoundMode = VP_ROUND_HALF_UP; /* Mode for general rounding operation */ U_LONG 2046 ext/bigdecimal/bigdecimal.c static U_LONG BASE_FIG = 4; /* =log10(BASE) */ U_LONG 2047 ext/bigdecimal/bigdecimal.c static U_LONG BASE = 10000L; /* Base value(value must be 10**BASE_FIG) */ U_LONG 2050 ext/bigdecimal/bigdecimal.c static U_LONG HALF_BASE = 5000L;/* =BASE/2 */ U_LONG 2051 ext/bigdecimal/bigdecimal.c static U_LONG BASE1 = 1000L; /* =BASE/10 */ U_LONG 2074 ext/bigdecimal/bigdecimal.c static U_LONG VpAddAbs(Real *a,Real *b,Real *c); U_LONG 2075 ext/bigdecimal/bigdecimal.c static U_LONG VpSubAbs(Real *a,Real *b,Real *c); U_LONG 2076 ext/bigdecimal/bigdecimal.c static U_LONG VpSetPTR(Real *a,Real *b,Real *c,U_LONG *a_pos,U_LONG *b_pos,U_LONG *c_pos,U_LONG *av,U_LONG *bv); U_LONG 2079 ext/bigdecimal/bigdecimal.c static int VpRdup(Real *m,U_LONG ind_m); U_LONG 2086 ext/bigdecimal/bigdecimal.c VpMemAlloc(U_LONG mb) U_LONG 2136 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG U_LONG 2142 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG U_LONG 2143 ext/bigdecimal/bigdecimal.c VpSetPrecLimit(U_LONG n) U_LONG 2145 ext/bigdecimal/bigdecimal.c U_LONG s = gnPrecLimit; U_LONG 2196 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG U_LONG 2202 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG U_LONG 2208 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG U_LONG 2405 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG U_LONG 2409 ext/bigdecimal/bigdecimal.c U_LONG nc; U_LONG 2448 ext/bigdecimal/bigdecimal.c VP_EXPORT U_LONG U_LONG 2449 ext/bigdecimal/bigdecimal.c VpInit(U_LONG BaseVal) U_LONG 2459 ext/bigdecimal/bigdecimal.c U_LONG w; U_LONG 2479 ext/bigdecimal/bigdecimal.c VpConstOne = VpAlloc((U_LONG)1, "1"); U_LONG 2480 ext/bigdecimal/bigdecimal.c VpPt5 = VpAlloc((U_LONG)1, ".5"); U_LONG 2551 ext/bigdecimal/bigdecimal.c VpAlloc(U_LONG mx, const char *szVal) U_LONG 2553 ext/bigdecimal/bigdecimal.c U_LONG i, ni, ipn, ipf, nf, ipe, ne, nalloc; U_LONG 2557 ext/bigdecimal/bigdecimal.c U_LONG mf = VpGetPrecLimit(); U_LONG 2577 ext/bigdecimal/bigdecimal.c vp = (Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG)); U_LONG 2609 ext/bigdecimal/bigdecimal.c vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG)); U_LONG 2615 ext/bigdecimal/bigdecimal.c vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG)); U_LONG 2621 ext/bigdecimal/bigdecimal.c vp = (Real *) VpMemAlloc(sizeof(Real) + sizeof(U_LONG)); U_LONG 2680 ext/bigdecimal/bigdecimal.c vp =(Real *) VpMemAlloc(sizeof(Real) + mx * sizeof(U_LONG)); U_LONG 2703 ext/bigdecimal/bigdecimal.c U_LONG n; U_LONG 2719 ext/bigdecimal/bigdecimal.c memcpy(c->frac, a->frac, n * sizeof(U_LONG)); U_LONG 2747 ext/bigdecimal/bigdecimal.c U_LONG n, na, nb, i; U_LONG 2748 ext/bigdecimal/bigdecimal.c U_LONG mrv; U_LONG 2870 ext/bigdecimal/bigdecimal.c static U_LONG U_LONG 2873 ext/bigdecimal/bigdecimal.c U_LONG word_shift; U_LONG 2874 ext/bigdecimal/bigdecimal.c U_LONG carry; U_LONG 2875 ext/bigdecimal/bigdecimal.c U_LONG ap; U_LONG 2876 ext/bigdecimal/bigdecimal.c U_LONG bp; U_LONG 2877 ext/bigdecimal/bigdecimal.c U_LONG cp; U_LONG 2878 ext/bigdecimal/bigdecimal.c U_LONG a_pos; U_LONG 2879 ext/bigdecimal/bigdecimal.c U_LONG b_pos; U_LONG 2880 ext/bigdecimal/bigdecimal.c U_LONG c_pos; U_LONG 2881 ext/bigdecimal/bigdecimal.c U_LONG av, bv, mrv; U_LONG 2962 ext/bigdecimal/bigdecimal.c static U_LONG U_LONG 2965 ext/bigdecimal/bigdecimal.c U_LONG word_shift; U_LONG 2966 ext/bigdecimal/bigdecimal.c U_LONG mrv; U_LONG 2967 ext/bigdecimal/bigdecimal.c U_LONG borrow; U_LONG 2968 ext/bigdecimal/bigdecimal.c U_LONG ap; U_LONG 2969 ext/bigdecimal/bigdecimal.c U_LONG bp; U_LONG 2970 ext/bigdecimal/bigdecimal.c U_LONG cp; U_LONG 2971 ext/bigdecimal/bigdecimal.c U_LONG a_pos; U_LONG 2972 ext/bigdecimal/bigdecimal.c U_LONG b_pos; U_LONG 2973 ext/bigdecimal/bigdecimal.c U_LONG c_pos; U_LONG 2974 ext/bigdecimal/bigdecimal.c U_LONG av, bv; U_LONG 3076 ext/bigdecimal/bigdecimal.c static U_LONG U_LONG 3077 ext/bigdecimal/bigdecimal.c VpSetPTR(Real *a, Real *b, Real *c, U_LONG *a_pos, U_LONG *b_pos, U_LONG *c_pos, U_LONG *av, U_LONG *bv) U_LONG 3079 ext/bigdecimal/bigdecimal.c U_LONG left_word, right_word, word_shift; U_LONG 3174 ext/bigdecimal/bigdecimal.c U_LONG MxIndA, MxIndB, MxIndAB, MxIndC; U_LONG 3175 ext/bigdecimal/bigdecimal.c U_LONG ind_c, i, ii, nc; U_LONG 3176 ext/bigdecimal/bigdecimal.c U_LONG ind_as, ind_ae, ind_bs, ind_be; U_LONG 3177 ext/bigdecimal/bigdecimal.c U_LONG Carry, s; U_LONG 3217 ext/bigdecimal/bigdecimal.c c = VpAlloc((U_LONG)((MxIndAB + 1) * BASE_FIG), "#0"); U_LONG 3231 ext/bigdecimal/bigdecimal.c memset(c->frac, 0, (nc + 1) * sizeof(U_LONG)); /* Initialize c */ U_LONG 3301 ext/bigdecimal/bigdecimal.c U_LONG word_a, word_b, word_c, word_r; U_LONG 3302 ext/bigdecimal/bigdecimal.c U_LONG i, n, ind_a, ind_b, ind_c, ind_r; U_LONG 3303 ext/bigdecimal/bigdecimal.c U_LONG nLoop; U_LONG 3304 ext/bigdecimal/bigdecimal.c U_LONG q, b1, b1p1, b1b2, b1b2p1, r1r2; U_LONG 3305 ext/bigdecimal/bigdecimal.c U_LONG borrow, borrow1, borrow2, qb; U_LONG 3511 ext/bigdecimal/bigdecimal.c U_LONG ind_a, i; U_LONG 3525 ext/bigdecimal/bigdecimal.c memmove(&(a->frac[0]),&(a->frac[i]),(a->Prec)*sizeof(U_LONG)); U_LONG 3550 ext/bigdecimal/bigdecimal.c U_LONG mx, ind; U_LONG 3645 ext/bigdecimal/bigdecimal.c U_LONG i, j, nc, nd, ZeroSup; U_LONG 3646 ext/bigdecimal/bigdecimal.c U_LONG n, m, e, nn; U_LONG 3739 ext/bigdecimal/bigdecimal.c U_LONG ie; U_LONG 3740 ext/bigdecimal/bigdecimal.c U_LONG i; U_LONG 3767 ext/bigdecimal/bigdecimal.c U_LONG n; U_LONG 3783 ext/bigdecimal/bigdecimal.c U_LONG i, ZeroSup; U_LONG 3784 ext/bigdecimal/bigdecimal.c U_LONG n, m, e, nn; U_LONG 3863 ext/bigdecimal/bigdecimal.c U_LONG i, ZeroSup; U_LONG 3864 ext/bigdecimal/bigdecimal.c U_LONG n, m, e, nn; U_LONG 3909 ext/bigdecimal/bigdecimal.c U_LONG i; U_LONG 3910 ext/bigdecimal/bigdecimal.c U_LONG n, m, e, nn; U_LONG 3971 ext/bigdecimal/bigdecimal.c VpCtoV(Real *a, const char *int_chr, U_LONG ni, const char *frac, U_LONG nf, const char *exp_chr, U_LONG ne) U_LONG 3973 ext/bigdecimal/bigdecimal.c U_LONG i, j, ind_a, ma, mi, me; U_LONG 3974 ext/bigdecimal/bigdecimal.c U_LONG loc; U_LONG 3983 ext/bigdecimal/bigdecimal.c memset(a->frac, 0, ma * sizeof(U_LONG)); U_LONG 4048 ext/bigdecimal/bigdecimal.c while((j < (U_LONG)BASE_FIG) &&(i < mi)) { U_LONG 4065 ext/bigdecimal/bigdecimal.c while((j < (U_LONG)BASE_FIG) &&(i < nf)) { U_LONG 4083 ext/bigdecimal/bigdecimal.c while(j < (U_LONG)BASE_FIG) { U_LONG 4112 ext/bigdecimal/bigdecimal.c U_LONG ind_m, mm, fig; U_LONG 4176 ext/bigdecimal/bigdecimal.c U_LONG i, ind_m, mm; U_LONG 4177 ext/bigdecimal/bigdecimal.c U_LONG ne; U_LONG 4211 ext/bigdecimal/bigdecimal.c memset(m->frac, 0, mm * sizeof(U_LONG)); U_LONG 4214 ext/bigdecimal/bigdecimal.c i =(U_LONG) val; U_LONG 4228 ext/bigdecimal/bigdecimal.c (U_LONG)(val*((double)((S_INT)BASE)))); U_LONG 4247 ext/bigdecimal/bigdecimal.c U_LONG mm, ind_m; U_LONG 4248 ext/bigdecimal/bigdecimal.c U_LONG val, v1, v2, v; U_LONG 4260 ext/bigdecimal/bigdecimal.c val =(U_LONG)(-ival); U_LONG 4365 ext/bigdecimal/bigdecimal.c y->MaxPrec = (U_LONG)Min(n , y_prec); U_LONG 4368 ext/bigdecimal/bigdecimal.c if((U_LONG)n<maxnr) n = (U_LONG)maxnr; U_LONG 4371 ext/bigdecimal/bigdecimal.c if(y->MaxPrec > (U_LONG)y_prec) y->MaxPrec = (U_LONG)y_prec; U_LONG 4426 ext/bigdecimal/bigdecimal.c U_LONG v,shifter; U_LONG 4427 ext/bigdecimal/bigdecimal.c U_LONG div; U_LONG 4443 ext/bigdecimal/bigdecimal.c if(((U_LONG)ix)>=y->Prec) return 0; /* rounding position too right(small). */ U_LONG 4463 ext/bigdecimal/bigdecimal.c memset(y->frac+ix+1, 0, (y->Prec - (ix+1)) * sizeof(U_LONG)); U_LONG 4485 ext/bigdecimal/bigdecimal.c if((U_LONG)i==(BASE_FIG-1)) { U_LONG 4529 ext/bigdecimal/bigdecimal.c U_LONG v; U_LONG 4547 ext/bigdecimal/bigdecimal.c VpLimitRound(Real *c,U_LONG ixDigit) U_LONG 4549 ext/bigdecimal/bigdecimal.c U_LONG ix = VpGetPrecLimit(); U_LONG 4558 ext/bigdecimal/bigdecimal.c VpInternalRound(Real *c,int ixDigit,U_LONG vPrev,U_LONG v) U_LONG 4599 ext/bigdecimal/bigdecimal.c VpRdup(Real *m,U_LONG ind_m) U_LONG 4601 ext/bigdecimal/bigdecimal.c U_LONG carry; U_LONG 4626 ext/bigdecimal/bigdecimal.c U_LONG my, ind_y, ind_x; U_LONG 4633 ext/bigdecimal/bigdecimal.c if(x->exponent > 0 && (U_LONG)x->exponent >= x->Prec) { U_LONG 4641 ext/bigdecimal/bigdecimal.c y->Prec = x->Prec -(U_LONG) x->exponent; U_LONG 4671 ext/bigdecimal/bigdecimal.c U_LONG s, ss; U_LONG 4740 ext/bigdecimal/bigdecimal.c if(s >(U_LONG) n) goto out_loop1; U_LONG 4779 ext/bigdecimal/bigdecimal.c U_LONG i; U_LONG 78 ext/bigdecimal/bigdecimal.h U_LONG MaxPrec; /* Maximum precision size */ U_LONG 81 ext/bigdecimal/bigdecimal.h U_LONG Prec; /* Current precision size. */ U_LONG 96 ext/bigdecimal/bigdecimal.h U_LONG frac[1]; /* Pointer to array of fraction part. */ U_LONG 106 ext/bigdecimal/bigdecimal.h VpNewRbClass(U_LONG mx,char *str,VALUE klass); U_LONG 108 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpCreateRbObject(U_LONG mx,const char *str); U_LONG 110 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpBaseFig(void); U_LONG 111 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpDblFig(void); U_LONG 112 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpBaseVal(void); U_LONG 121 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpGetPrecLimit(void); U_LONG 122 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpSetPrecLimit(U_LONG n); U_LONG 133 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpNumOfChars(Real *vp,const char *pszFmt); U_LONG 134 ext/bigdecimal/bigdecimal.h VP_EXPORT U_LONG VpInit(U_LONG BaseVal); U_LONG 135 ext/bigdecimal/bigdecimal.h VP_EXPORT void *VpMemAlloc(U_LONG mb); U_LONG 137 ext/bigdecimal/bigdecimal.h VP_EXPORT Real *VpAlloc(U_LONG mx, const char *szVal); U_LONG 148 ext/bigdecimal/bigdecimal.h VP_EXPORT int VpCtoV(Real *a,const char *int_chr,U_LONG ni,const char *frac,U_LONG nf,const char *exp_chr,U_LONG ne);