• Home
  • Raw
  • Download

Lines Matching refs:MPD

93 #undef MPD
103 #define MPD(v) (&((PyDecObject *)v)->dec) macro
1715 MPD(dec)->flags = MPD_STATIC|MPD_STATIC_DATA; in PyDecType_New()
1716 MPD(dec)->exp = 0; in PyDecType_New()
1717 MPD(dec)->digits = 0; in PyDecType_New()
1718 MPD(dec)->len = 0; in PyDecType_New()
1719 MPD(dec)->alloc = _Py_DEC_MINALLOC; in PyDecType_New()
1720 MPD(dec)->data = dec->data; in PyDecType_New()
1729 mpd_del(MPD(dec)); in dec_dealloc()
1826 mpd_qset_string(MPD(dec), s, CTX(context), &status); in PyDecType_FromCString()
1852 mpd_qset_string(MPD(dec), s, &maxctx, &status); in PyDecType_FromCStringExact()
1855 mpd_seterror(MPD(dec), MPD_Invalid_operation, &status); in PyDecType_FromCStringExact()
1910 MPD(dec)->data[0] = v; in _dec_settriple()
1911 MPD(dec)->len = 1; in _dec_settriple()
1916 MPD(dec)->data[1] = q; in _dec_settriple()
1917 MPD(dec)->data[0] = r; in _dec_settriple()
1918 MPD(dec)->len = q ? 2 : 1; in _dec_settriple()
1920 mpd_set_flags(MPD(dec), sign); in _dec_settriple()
1921 MPD(dec)->exp = exp; in _dec_settriple()
1922 mpd_setdigits(MPD(dec)); in _dec_settriple()
1937 mpd_qset_ssize(MPD(dec), v, CTX(context), &status); in PyDecType_FromSsize()
1960 mpd_qset_ssize(MPD(dec), v, &maxctx, &status); in PyDecType_FromSsizeExact()
2002 mpd_qfinalize(MPD(dec), ctx, status); in dec_from_long()
2007 mpd_qimport_u32(MPD(dec), l->ob_digit, len, sign, PyLong_BASE, in dec_from_long()
2010 mpd_qimport_u16(MPD(dec), l->ob_digit, len, sign, PyLong_BASE, in dec_from_long()
2068 mpd_seterror(MPD(dec), MPD_Invalid_operation, &status); in PyDecType_FromLongExact()
2128 mpd_setspecial(MPD(dec), MPD_POS, MPD_NAN); in PyDecType_FromFloatExact()
2131 mpd_setspecial(MPD(dec), sign, MPD_INF); in PyDecType_FromFloatExact()
2196 mpd_qmul(MPD(dec), MPD(dec), d1, &maxctx, &status); in PyDecType_FromFloatExact()
2204 mpd_set_sign(MPD(dec), sign); in PyDecType_FromFloatExact()
2205 MPD(dec)->exp = -k; in PyDecType_FromFloatExact()
2222 mpd_qfinalize(MPD(dec), CTX(context), &status); in PyDecType_FromFloat()
2248 mpd_qcopy(MPD(dec), MPD(v), &status); in PyDecType_FromDecimalExact()
2542 mpd_qcopy(MPD(result), MPD(v), &status); in dec_apply()
2548 mpd_qfinalize(MPD(result), CTX(context), &status); in dec_apply()
2602 if (mpd_isnan(MPD(v)) && in PyDec_FromObject()
2603 MPD(v)->digits > ctx->prec - ctx->clamp) { in PyDec_FromObject()
2613 mpd_setspecial(MPD(result), MPD_POS, MPD_NAN); in PyDec_FromObject()
2795 vv = mpd_qncopy(MPD(v)); in multiply_by_denominator()
2815 mpd_qmul(MPD(result), vv, MPD(denom), &maxctx, &status); in multiply_by_denominator()
2816 MPD(result)->exp = exp; in multiply_by_denominator()
2906 if (*wcmp && !mpd_isspecial(MPD(v))) { in convert_op_cmp()
2962 size = mpd_to_sci_size(&cp, MPD(dec), CtxCaps(context)); in dec_str()
2981 cp = mpd_to_sci(MPD(dec), CtxCaps(context)); in dec_repr()
3158 decstring = mpd_qformat_spec(MPD(dec), &spec, CTX(context), &status); in dec_format()
3199 if (mpd_isspecial(MPD(dec))) { in dec_as_long()
3200 if (mpd_isnan(MPD(dec))) { in dec_as_long()
3218 mpd_qround_to_int(x, MPD(dec), &workctx, &status); in dec_as_long()
3278 if (mpd_isspecial(MPD(self))) { in dec_as_integer_ratio()
3279 if (mpd_isnan(MPD(self))) { in dec_as_integer_ratio()
3297 if (!mpd_qcopy(MPD(tmp), MPD(self), &status)) { in dec_as_integer_ratio()
3303 exp = mpd_iszero(MPD(tmp)) ? 0 : MPD(tmp)->exp; in dec_as_integer_ratio()
3304 MPD(tmp)->exp = 0; in dec_as_integer_ratio()
3396 mpd_qround_to_int(MPD(result), MPD(dec), &workctx, &status); in PyDec_ToIntegralValue()
3437 mpd_qround_to_intx(MPD(result), MPD(dec), &workctx, &status); in PyDec_ToIntegralExact()
3451 if (mpd_isnan(MPD(dec))) { in PyDec_AsFloat()
3452 if (mpd_issnan(MPD(dec))) { in PyDec_AsFloat()
3457 if (mpd_isnegative(MPD(dec))) { in PyDec_AsFloat()
3513 mpd_qquantize(MPD(result), MPD(dec), &q, CTX(context), &status); in PyDec_Round()
3541 x = mpd_qncopy(MPD(dec)); in PyDec_AsTuple()
3547 sign = PyLong_FromUnsignedLong(mpd_sign(MPD(dec))); in PyDec_AsTuple()
3568 expt = PyLong_FromSsize_t(MPD(dec)->exp); in PyDec_AsTuple()
3640 MPDFUNC(MPD(result), MPD(self), CTX(context), &status); \
3668 MPDFUNC(MPD(result), MPD(a), MPD(b), CTX(context), &status); \
3684 return MPDFUNC(MPD(self)) ? incr_true() : incr_false(); \
3701 return MPDFUNC(MPD(self), CTX(context)) ? incr_true() : incr_false(); \
3724 MPDFUNC(MPD(result), MPD(self), CTX(context), &status); \
3758 MPDFUNC(MPD(result), MPD(a), MPD(b), CTX(context), &status); \
3795 MPDFUNC(MPD(result), MPD(a), MPD(b)); \
3828 MPDFUNC(MPD(result), MPD(a), MPD(b), MPD(c), CTX(context), &status); \
3868 return !mpd_iszero(MPD(v)); in nm_nonzero()
3897 mpd_qdivmod(MPD(q), MPD(r), MPD(a), MPD(b), CTX(context), &status); in nm_mpd_qdivmod()
3940 mpd_qpow(MPD(result), MPD(a), MPD(b), in nm_mpd_qpow()
3944 mpd_qpowmod(MPD(result), MPD(a), MPD(b), MPD(c), in nm_mpd_qpow()
4005 if (mpd_isspecial(MPD(self))) { in Dec_UnaryFuncVA()
4009 retval = mpd_adjexp(MPD(self)); in Dec_UnaryFuncVA()
4053 mpd_qcopy_abs(MPD(result), MPD(self), &status); in dec_mpd_qcopy_abs()
4073 mpd_qcopy_negate(MPD(result), MPD(self), &status); in dec_mpd_qcopy_negate()
4100 cp = mpd_class(MPD(self), CTX(context)); in Dec_UnaryFuncVA()
4119 size = mpd_to_eng_size(&s, MPD(self), CtxCaps(context)); in dec_mpd_to_eng()
4159 mpd_qcopy_sign(MPD(result), MPD(a), MPD(b), &status); in Dec_BinaryFuncVA_NO_CTX()
4186 result = mpd_same_quantum(MPD(a), MPD(b)) ? incr_true() : incr_false(); in dec_mpd_same_quantum()
4239 mpd_qquantize(MPD(result), MPD(a), MPD(b), &workctx, &status); in Dec_BinaryFuncVA()
4266 a_issnan = mpd_issnan(MPD(a)); in dec_richcompare()
4267 b_issnan = mpd_issnan(MPD(b)); in dec_richcompare()
4269 r = mpd_qcmp(MPD(a), MPD(b), &status); in dec_richcompare()
4400 if (mpd_isspecial(MPD(v))) { in _dec_hash()
4401 if (mpd_issnan(MPD(v))) { in _dec_hash()
4406 else if (mpd_isnan(MPD(v))) { in _dec_hash()
4410 return py_hash_inf * mpd_arith_sign(MPD(v)); in _dec_hash()
4428 exp = MPD(v)->exp; in _dec_hash()
4441 if (!mpd_qcopy(tmp, MPD(v), &status)) { in _dec_hash()
4455 result = mpd_ispositive(MPD(v)) ? result : -result; in _dec_hash()
4515 if (mpd_isdynamic_data(MPD(v))) { in dec_sizeof()
4516 res += MPD(v)->alloc * sizeof(mpd_uint_t); in dec_sizeof()
4754 ret = MPDFUNC(MPD(a), CTX(context)) ? incr_true() : incr_false(); \
4769 ret = MPDFUNC(MPD(a)) ? incr_true() : incr_false(); \
4789 MPDFUNC(MPD(result), MPD(a), CTX(context), &status); \
4821 MPDFUNC(MPD(result), MPD(a), MPD(b), CTX(context), &status); \
4856 MPDFUNC(MPD(result), MPD(a), MPD(b)); \
4886 MPDFUNC(MPD(result), MPD(a), MPD(b), MPD(c), CTX(context), &status); \
4959 mpd_qdivmod(MPD(q), MPD(r), MPD(a), MPD(b), CTX(context), &status); in DecCtx_UnaryFunc()
5008 mpd_qpow(MPD(result), MPD(a), MPD(b), in ctx_mpd_qpow()
5012 mpd_qpowmod(MPD(result), MPD(a), MPD(b), MPD(c), in ctx_mpd_qpow()
5056 return mpd_iscanonical(MPD(v)) ? incr_true() : incr_false(); in DecCtx_BoolFunc()
5099 mpd_qcopy_abs(MPD(result), MPD(a), &status); in ctx_mpd_qcopy_abs()
5132 mpd_qcopy_negate(MPD(result), MPD(a), &status); in ctx_mpd_qcopy_negate()
5153 cp = mpd_class(MPD(a), CTX(context)); in DecCtx_UnaryFunc()
5169 size = mpd_to_sci_size(&s, MPD(a), CtxCaps(context)); in ctx_mpd_to_sci()
5192 size = mpd_to_eng_size(&s, MPD(a), CtxCaps(context)); in ctx_mpd_to_eng()
5230 mpd_qcopy_sign(MPD(result), MPD(a), MPD(b), &status); in DecCtx_BinaryFunc_NO_CTX()
5262 result = mpd_same_quantum(MPD(a), MPD(b)) ? incr_true() : incr_false(); in DecCtx_BinaryFunc()