• Home
  • Raw
  • Download

Lines Matching refs:workctx

750 mpd_workcontext(mpd_context_t *workctx, const mpd_context_t *ctx)  in mpd_workcontext()  argument
752 workctx->prec = ctx->prec; in mpd_workcontext()
753 workctx->emax = ctx->emax; in mpd_workcontext()
754 workctx->emin = ctx->emin; in mpd_workcontext()
755 workctx->round = ctx->round; in mpd_workcontext()
756 workctx->traps = 0; in mpd_workcontext()
757 workctx->status = 0; in mpd_workcontext()
758 workctx->newtrap = 0; in mpd_workcontext()
759 workctx->clamp = ctx->clamp; in mpd_workcontext()
760 workctx->allcr = ctx->allcr; in mpd_workcontext()
3922 mpd_context_t workctx = *ctx; in mpd_qdiv() local
3925 workctx.prec = a->digits + b->digits * 4; in mpd_qdiv()
3926 if (workctx.prec >= ctx->prec) { in mpd_qdiv()
3931 _mpd_qdiv(SET_IDEAL_EXP, q, a, b, &workctx, &ystatus); in mpd_qdiv()
4385 mpd_context_t workctx; in _mpd_qexp() local
4436 mpd_maxcontext(&workctx); in _mpd_qexp()
4437 workctx.prec = ctx->prec + t + 2; in _mpd_qexp()
4438 workctx.prec = (workctx.prec < 10) ? 10 : workctx.prec; in _mpd_qexp()
4439 workctx.round = MPD_ROUND_HALF_EVEN; in _mpd_qexp()
4453 n = _mpd_get_exp_iterations(result, workctx.prec); in _mpd_qexp()
4464 mpd_qdiv(&tmp, result, &word, &workctx, &workctx.status); in _mpd_qexp()
4465 mpd_qfma(&sum, &sum, &tmp, &one, &workctx, &workctx.status); in _mpd_qexp()
4469 _mpd_qpow_uint(result, &sum, mpd_pow10[t], MPD_POS, &workctx, status); in _mpd_qexp()
4472 _mpd_qpow_uint(result, &sum, mpd_pow10[t], MPD_POS, &workctx, status); in _mpd_qexp()
4477 &workctx, status); in _mpd_qexp()
4478 _mpd_qpow_uint(result, &tmp, mpd_pow10[t], MPD_POS, &workctx, status); in _mpd_qexp()
4484 *status |= (workctx.status&MPD_Errors); in _mpd_qexp()
4493 mpd_context_t workctx; in mpd_qexp() local
4512 workctx = *ctx; in mpd_qexp()
4513 workctx.round = MPD_ROUND_HALF_EVEN; in mpd_qexp()
4532 workctx.clamp = 0; in mpd_qexp()
4535 workctx.prec = prec; in mpd_qexp()
4538 _mpd_qexp(result, a, &workctx, &workstatus); in mpd_qexp()
4541 ulpexp = result->exp + result->digits - workctx.prec; in mpd_qexp()
4561 workctx.prec = ctx->prec; in mpd_qexp()
4562 mpd_qadd(&t1, result, &ulp, &workctx, &workctx.status); in mpd_qexp()
4563 mpd_qsub(&t2, result, &ulp, &workctx, &workctx.status); in mpd_qexp()
4566 workctx.clamp = ctx->clamp; in mpd_qexp()
4567 _mpd_zeropad(result, &workctx, status); in mpd_qexp()
4568 mpd_check_underflow(result, &workctx, status); in mpd_qexp()
4569 mpd_qfinalize(result, &workctx, status); in mpd_qexp()
4580 _mpd_qexp(result, a, &workctx, status); in mpd_qexp()
4581 _mpd_zeropad(result, &workctx, status); in mpd_qexp()
4582 mpd_check_underflow(result, &workctx, status); in mpd_qexp()
4583 mpd_qfinalize(result, &workctx, status); in mpd_qexp()
5013 mpd_context_t workctx; in mpd_qln() local
5069 workctx = *ctx; in mpd_qln()
5070 workctx.round = MPD_ROUND_HALF_EVEN; in mpd_qln()
5087 workctx.clamp = 0; in mpd_qln()
5090 workctx.prec = prec; in mpd_qln()
5091 _mpd_qln(result, a, &workctx, status); in mpd_qln()
5093 result->exp + result->digits-workctx.prec); in mpd_qln()
5095 workctx.prec = ctx->prec; in mpd_qln()
5096 mpd_qadd(&t1, result, &ulp, &workctx, &workctx.status); in mpd_qln()
5097 mpd_qsub(&t2, result, &ulp, &workctx, &workctx.status); in mpd_qln()
5100 workctx.clamp = ctx->clamp; in mpd_qln()
5101 mpd_check_underflow(result, &workctx, status); in mpd_qln()
5102 mpd_qfinalize(result, &workctx, status); in mpd_qln()
5113 _mpd_qln(result, a, &workctx, status); in mpd_qln()
5114 mpd_check_underflow(result, &workctx, status); in mpd_qln()
5115 mpd_qfinalize(result, &workctx, status); in mpd_qln()
5131 mpd_context_t workctx; in _mpd_qlog10() local
5134 mpd_maxcontext(&workctx); in _mpd_qlog10()
5135 workctx.prec = ctx->prec + 3; in _mpd_qlog10()
5138 _mpd_qln(result, a, &workctx, status); in _mpd_qlog10()
5140 mpd_qln10(&ln10, workctx.prec, status); in _mpd_qlog10()
5143 workctx = *ctx; in _mpd_qlog10()
5144 workctx.round = MPD_ROUND_HALF_EVEN; in _mpd_qlog10()
5147 _mpd_qdiv(NO_IDEAL_EXP, result, result, &ln10, &workctx, status); in _mpd_qlog10()
5157 mpd_context_t workctx; in mpd_qlog10() local
5160 workctx = *ctx; in mpd_qlog10()
5161 workctx.round = MPD_ROUND_HALF_EVEN; in mpd_qlog10()
5190 mpd_qfinalize(result, &workctx, status); in mpd_qlog10()
5236 workctx.clamp = 0; in mpd_qlog10()
5239 workctx.prec = prec; in mpd_qlog10()
5240 _mpd_qlog10(SKIP_FINALIZE, result, a, &workctx, status); in mpd_qlog10()
5242 result->exp + result->digits-workctx.prec); in mpd_qlog10()
5244 workctx.prec = ctx->prec; in mpd_qlog10()
5245 mpd_qadd(&t1, result, &ulp, &workctx, &workctx.status); in mpd_qlog10()
5246 mpd_qsub(&t2, result, &ulp, &workctx, &workctx.status); in mpd_qlog10()
5249 workctx.clamp = ctx->clamp; in mpd_qlog10()
5250 mpd_check_underflow(result, &workctx, status); in mpd_qlog10()
5251 mpd_qfinalize(result, &workctx, status); in mpd_qlog10()
5262 _mpd_qlog10(DO_FINALIZE, result, a, &workctx, status); in mpd_qlog10()
5263 mpd_check_underflow(result, &workctx, status); in mpd_qlog10()
6146 mpd_context_t workctx; in mpd_qnext_minus() local
6170 mpd_workcontext(&workctx, ctx); in mpd_qnext_minus()
6171 workctx.round = MPD_ROUND_FLOOR; in mpd_qnext_minus()
6177 mpd_qfinalize(result, &workctx, &workctx.status); in mpd_qnext_minus()
6178 if (workctx.status&(MPD_Inexact|MPD_Errors)) { in mpd_qnext_minus()
6179 *status |= (workctx.status&MPD_Errors); in mpd_qnext_minus()
6183 workctx.status = 0; in mpd_qnext_minus()
6184 mpd_qsub(result, a, &tiny, &workctx, &workctx.status); in mpd_qnext_minus()
6185 *status |= (workctx.status&MPD_Errors); in mpd_qnext_minus()
6193 mpd_context_t workctx; in mpd_qnext_plus() local
6217 mpd_workcontext(&workctx, ctx); in mpd_qnext_plus()
6218 workctx.round = MPD_ROUND_CEILING; in mpd_qnext_plus()
6224 mpd_qfinalize(result, &workctx, &workctx.status); in mpd_qnext_plus()
6225 if (workctx.status & (MPD_Inexact|MPD_Errors)) { in mpd_qnext_plus()
6226 *status |= (workctx.status&MPD_Errors); in mpd_qnext_plus()
6230 workctx.status = 0; in mpd_qnext_plus()
6231 mpd_qadd(result, a, &tiny, &workctx, &workctx.status); in mpd_qnext_plus()
6232 *status |= (workctx.status&MPD_Errors); in mpd_qnext_plus()
6368 mpd_context_t workctx; in _mpd_qpow_int() local
6374 mpd_workcontext(&workctx, ctx); in _mpd_qpow_int()
6375 workctx.prec += (exp->digits + exp->exp + 2); in _mpd_qpow_int()
6376 workctx.round = MPD_ROUND_HALF_EVEN; in _mpd_qpow_int()
6377 workctx.clamp = 0; in _mpd_qpow_int()
6380 workctx.prec += 1; in _mpd_qpow_int()
6381 mpd_qdiv(&tbase, &one, base, &workctx, &workstatus); in _mpd_qpow_int()
6395 n = mpd_qabs_uint(exp, &workctx.status); in _mpd_qpow_int()
6396 if (workctx.status&MPD_Invalid_operation) { in _mpd_qpow_int()
6401 _mpd_qpow_mpd(result, &tbase, &texp, resultsign, &workctx, status); in _mpd_qpow_int()
6404 _mpd_qpow_uint(result, &tbase, n, resultsign, &workctx, status); in _mpd_qpow_int()
6659 mpd_context_t workctx; in _mpd_qpow_real() local
6667 mpd_maxcontext(&workctx); in _mpd_qpow_real()
6668 workctx.prec = (base->digits > ctx->prec) ? base->digits : ctx->prec; in _mpd_qpow_real()
6669 workctx.prec += (4 + MPD_EXPDIGITS); in _mpd_qpow_real()
6670 workctx.round = MPD_ROUND_HALF_EVEN; in _mpd_qpow_real()
6671 workctx.allcr = ctx->allcr; in _mpd_qpow_real()
6697 mpd_qln(result, base, &workctx, &workctx.status); in _mpd_qpow_real()
6698 mpd_qmul(result, result, &texp, &workctx, &workctx.status); in _mpd_qpow_real()
6699 mpd_qexp(result, result, &workctx, status); in _mpd_qpow_real()
6702 *status |= (workctx.status&MPD_Errors); in _mpd_qpow_real()
7112 mpd_context_t workctx; in mpd_qrem_near() local
7169 mpd_maxcontext(&workctx); in mpd_qrem_near()
7172 _mpd_qsub(&q, r, b, &workctx, &workctx.status); in mpd_qrem_near()
7176 _mpd_qadd(&q, r, b, &workctx, &workctx.status); in mpd_qrem_near()
7179 if (workctx.status&MPD_Errors) { in mpd_qrem_near()
7180 mpd_seterror(r, workctx.status&MPD_Errors, status); in mpd_qrem_near()
7362 mpd_context_t workctx = *ctx; in mpd_qfloor() local
7369 workctx.round = MPD_ROUND_FLOOR; in mpd_qfloor()
7371 &workctx, status); in mpd_qfloor()
7378 mpd_context_t workctx = *ctx; in mpd_qceil() local
7385 workctx.round = MPD_ROUND_CEILING; in mpd_qceil()
7387 &workctx, status); in mpd_qceil()
7548 mpd_context_t workctx; in _mpd_base_ndivmod() local
7574 mpd_maxcontext(&workctx); in _mpd_base_ndivmod()
7577 workctx.prec = a->digits - b->digits + 1 + 3; in _mpd_base_ndivmod()
7578 if (a->digits > MPD_MAX_PREC || workctx.prec > MPD_MAX_PREC) { in _mpd_base_ndivmod()
7588 _mpd_qreciprocal(rr, &bb, &workctx, &workctx.status); in _mpd_base_ndivmod()
7594 _mpd_qmul(qq, &aa, rr, &workctx, &workctx.status); in _mpd_base_ndivmod()
7598 mpd_qtrunc(qq, qq, &workctx, &workctx.status); in _mpd_base_ndivmod()
7600 workctx.prec = aa.digits + 3; in _mpd_base_ndivmod()
7601 workctx.emax = MPD_MAX_EMAX + 3; in _mpd_base_ndivmod()
7602 workctx.emin = MPD_MIN_EMIN - 3; in _mpd_base_ndivmod()
7606 _mpd_qmul(rr, &bb, qq, &workctx, &workctx.status); in _mpd_base_ndivmod()
7608 _mpd_qsub_exact(rr, &aa, rr, &workctx, &workctx.status); in _mpd_base_ndivmod()
7614 *status |= (workctx.status&MPD_Errors); in _mpd_base_ndivmod()
7625 _mpd_qadd_exact(rr, rr, &bb, &workctx, &workctx.status); in _mpd_base_ndivmod()
7626 _mpd_qadd_exact(qq, qq, &minus_one, &workctx, &workctx.status); in _mpd_base_ndivmod()
7634 _mpd_qsub_exact(rr, rr, &bb, &workctx, &workctx.status); in _mpd_base_ndivmod()
7635 _mpd_qadd_exact(qq, qq, &one, &workctx, &workctx.status); in _mpd_base_ndivmod()
7652 *status |= (workctx.status&MPD_Errors); in _mpd_base_ndivmod()
7854 mpd_context_t workctx; in mpd_qinvroot() local
7879 workctx = *ctx; in mpd_qinvroot()
7880 workctx.prec += 2; in mpd_qinvroot()
7881 workctx.round = MPD_ROUND_HALF_EVEN; in mpd_qinvroot()
7882 _mpd_qinvroot(result, a, &workctx, status); in mpd_qinvroot()
8050 mpd_context_t workctx = *ctx; in mpd_qsqrt() local
8052 workctx.prec = a->digits; in mpd_qsqrt()
8053 if (workctx.prec >= ctx->prec) { in mpd_qsqrt()
8058 _mpd_qsqrt(result, a, &workctx, &ystatus); in mpd_qsqrt()