Lines Matching defs:tmp

2275     PyObject *dec, *tmp;
2319 tmp = _py_float_abs(v);
2320 if (tmp == NULL) {
2325 n_d = _py_float_as_integer_ratio(tmp, NULL);
2326 Py_DECREF(tmp);
2333 tmp = _py_long_bit_length(d, NULL);
2334 if (tmp == NULL) {
2338 k = PyLong_AsSsize_t(tmp);
2339 Py_DECREF(tmp);
2458 PyObject *digits = NULL, *tmp;
2477 tmp = PyTuple_GET_ITEM(dectuple, 0);
2478 if (!PyLong_Check(tmp)) {
2483 sign = PyLong_AsLong(tmp);
2496 tmp = PyTuple_GET_ITEM(dectuple, 2);
2497 if (PyUnicode_Check(tmp)) {
2499 if (PyUnicode_CompareWithASCIIString(tmp, "F") == 0) {
2503 else if (PyUnicode_CompareWithASCIIString(tmp, "n") == 0) {
2506 else if (PyUnicode_CompareWithASCIIString(tmp, "N") == 0) {
2518 if (!PyLong_Check(tmp)) {
2523 exp = PyLong_AsSsize_t(tmp);
2558 tmp = PyTuple_GET_ITEM(digits, i);
2559 if (!PyLong_Check(tmp)) {
2564 l = PyLong_AsLong(tmp);
2959 PyObject *tmp = NULL;
2967 tmp = PyObject_GetAttrString(r, "denominator");
2968 if (tmp == NULL) {
2971 denom = PyDec_FromLongExact(tmp, context);
2972 Py_DECREF(tmp);
3018 PyObject *tmp, *num;
3020 tmp = PyObject_GetAttrString(r, "numerator");
3021 if (tmp == NULL) {
3025 num = PyDec_FromLongExact(tmp, context);
3026 Py_DECREF(tmp);
3066 PyObject *tmp = PyFloat_FromDouble(c.real);
3067 if (tmp == NULL) {
3072 *wcmp = PyDec_FromFloatExact(tmp, context);
3073 Py_DECREF(tmp);
3204 PyObject *tmp;
3215 tmp = PyUnicode_FromWideChar(buf, n);
3216 if (tmp == NULL) {
3219 utf8 = PyUnicode_AsUTF8String(tmp);
3220 Py_DECREF(tmp);
3320 mpd_t tmp = {MPD_STATIC|MPD_STATIC_DATA,0,0,0,MPD_MINALLOC_MAX,dt};
3432 mpd_qcopy(&tmp, mpd, &status);
3436 mpd_qrescale(&tmp, &tmp, -spec.prec, CTX(context), &status);
3439 tmp.exp += 2;
3440 mpd_qrescale(&tmp, &tmp, -spec.prec, CTX(context), &status);
3444 if (tmp.digits > prec) {
3445 _mpd_round(&tmp, &tmp, prec, CTX(context), &status);
3449 if (!mpd_iszero(&tmp)) {
3450 _mpd_round(&tmp, &tmp, spec.prec+1, CTX(context), &status);
3459 if (mpd_iszero(&tmp)) {
3460 mpd_set_positive(&tmp);
3461 mpd = &tmp;
3587 PyObject *tmp;
3606 tmp = dec_alloc();
3607 if (tmp == NULL) {
3611 if (!mpd_qcopy(MPD(tmp), MPD(self), &status)) {
3612 Py_DECREF(tmp);
3617 exp = mpd_iszero(MPD(tmp)) ? 0 : MPD(tmp)->exp;
3618 MPD(tmp)->exp = 0;
3621 numerator = dec_as_long(tmp, context, MPD_ROUND_FLOOR);
3622 Py_DECREF(tmp);
3632 tmp = PyLong_FromLong(10);
3633 if (tmp == NULL) {
3637 Py_SETREF(exponent, _py_long_power(tmp, exponent, Py_None));
3638 Py_DECREF(tmp);
3656 tmp = _PyLong_GCD(numerator, denominator);
3657 if (tmp == NULL) {
3660 Py_SETREF(numerator, _py_long_floor_divide(numerator, tmp));
3661 Py_SETREF(denominator, _py_long_floor_divide(denominator, tmp));
3662 Py_DECREF(tmp);
3849 PyObject *tmp = NULL;
3908 tmp = PyLong_FromLong(intstring[i]-'0');
3909 if (tmp == NULL) {
3912 PyTuple_SET_ITEM(coeff, i, tmp);
4700 mpd_t *tmp = NULL;
4725 tmp = mpd_qnew();
4726 if (tmp == NULL) {
4737 mpd_qsset_ssize(tmp, exp, &maxctx, &status);
4738 mpd_qpowmod(exp_hash, &ten, tmp, &p, &maxctx, &status);
4742 mpd_qsset_ssize(tmp, -exp, &maxctx, &status);
4743 mpd_qpowmod(exp_hash, &inv10_p, tmp, &p, &maxctx, &status);
4747 if (!mpd_qcopy(tmp, MPD(v), &status)) {
4750 tmp->exp = 0;
4751 mpd_set_positive(tmp);
4757 mpd_qmul(tmp, tmp, exp_hash, &maxctx, &status);
4758 mpd_qrem(tmp, tmp, &p, &maxctx, &status);
4760 result = mpd_qget_ssize(tmp, &status);
4778 if (tmp) mpd_del(tmp);