Lines Matching defs:exp

1044 /*   This computes C = exp(A)                                         */
1064 /* exp(-a) where a can be the tiniest number (Ntiny). */
2124 /* calculate the result using exp(ln(lhs)*rhs), which can */
2188 decExpOp(dac, dac, &aset, &status); /* dac=exp(dac) */
2836 Int exp; /* working exponent */
2889 /* calculate the ideal (preferred) exponent [floor(exp/2)] */
2942 exp=f->exponent+f->digits; /* adjusted to Hull rules */
2957 if ((exp & 1)==0) { /* even exponent */
2975 exp++; /* e=e+1 */
3017 a->exponent+=exp/2; /* set correct exponent */
3035 a->exponent-=exp/2; /* back to 0.1->1 */
3054 approxset.emin-=exp/2; /* adjust to match a */
3055 approxset.emax-=exp/2;
3068 approxset.emin-=exp/2; /* adjust to match a */
3069 approxset.emax-=exp/2;
3077 a->exponent+=exp/2; /* set correct exponent */
3649 Int exp=dn->exponent; /* local copy */
3681 if (exp!=0 || (*dn->lsu==0 && dn->digits==1)) return;
3689 if (exp==0) { /* simple integer [common fastpath] */
3699 pre=dn->digits+exp; /* digits before '.' */
3701 if ((exp>0) || (pre<-5)) { /* need exponential form */
3702 e=exp+dn->digits-1; /* calculate E value */
3828 /* calls from higher-level funtions (notable exp). */
3846 /* other operations, notable exp] */
4211 /* if exp<0 then if integer divide/residue then leave */
4232 /* exp=exp-1 */
4234 /* exp=exp+1 -- set the proper exponent */
4244 /* for calls from higher-level funtions (notable exp). */
4697 Int exp=lhs->exponent; /* save min(exponents) */
4698 if (rhs->exponent<exp) exp=rhs->exponent;
4703 res->exponent=exp; /* .. with proper exponent */
4764 Int exp, expunits, exprem; /* work */
4788 exp=rhs->exponent-exponent; /* RHS padding needed */
4790 expunits=exp/DECDPUN;
4791 exprem=exp%DECDPUN;
4863 /* for calls from other operations (notably exp). */
5184 /* This computes C = exp(A) */
5236 /* exp(-x) where x can be the tiniest number (Ntiny). */
5358 /* h=8 then exp(|rhs|) will be at least exp(1E+7) which is at */
5367 *a->lsu=2; /* not 1 but < exp(1) */
5408 /* Now use the usual power series to evaluate exp(x). The */
5588 /* iteration calculating a' = a + x * exp(-a) - 1. See, for example, */
5591 /* The iteration ends when the adjustment x*exp(-a)-1 is tiny enough. */
5602 /* 2. The speed of this function is about 10x slower than exp, as */
5756 /* will approach it from below, avoiding overflow when calling exp. */
5782 /* calculate the adjustment (exp(-a)*x-1) into b. This is a */
5786 /* range for calculating exp(-a) when a is the tiniest subnormal. */
5788 decExpOp(b, a, &bset, &ignore); /* b=exp(-a) */
6274 const Unit *b, Int blength, Int exp) {
6282 if (exp==0) { /* aligned; fastpath */
6297 if (alength>blength+(Int)D2U(exp)) return 1;
6298 if (alength+1<blength+(Int)D2U(exp)) return -1;
6303 need=blength+D2U(exp); /* maximum real length of B */
6313 expunits=exp/DECDPUN;
6314 exprem=exp%DECDPUN;
6633 Int d, exp; /* work */
6650 exp=dn->exponent;
6663 /* [if exp>0 then all trailing 0s are significant for trim] */
6664 if (exp<=0) { /* if digit might be significant */
6665 if (exp==0) break; /* then quit */
6666 exp++; /* next digit might be significant */
7238 /* printf(">> emin=%d exp=%d sdig=%d\n", set->emin, */