Lines Matching refs:cval
223 complex_subtype_from_c_complex(PyTypeObject *type, Py_complex cval) in complex_subtype_from_c_complex() argument
229 ((PyComplexObject *)op)->cval = cval; in complex_subtype_from_c_complex()
234 PyComplex_FromCComplex(Py_complex cval) in PyComplex_FromCComplex() argument
243 op->cval = cval; in PyComplex_FromCComplex()
269 return ((PyComplexObject *)op)->cval.real; in PyComplex_RealAsDouble()
280 return ((PyComplexObject *)op)->cval.imag; in PyComplex_ImagAsDouble()
328 return ((PyComplexObject *)op)->cval; in PyComplex_AsCComplex()
345 cv = ((PyComplexObject *)newop)->cval; in PyComplex_AsCComplex()
386 if (v->cval.real == 0. && copysign(1.0, v->cval.real)==1.0) { in complex_format()
388 im = PyOS_double_to_string(v->cval.imag, format_code, in complex_format()
396 pre = PyOS_double_to_string(v->cval.real, format_code, in complex_format()
404 im = PyOS_double_to_string(v->cval.imag, format_code, in complex_format()
466 hashreal = _Py_HashDouble(v->cval.real); in complex_hash()
469 hashimag = _Py_HashDouble(v->cval.imag); in complex_hash()
487 c = ((PyComplexObject *)(obj))->cval; \
715 neg.real = -v->cval.real; in complex_neg()
716 neg.imag = -v->cval.imag; in complex_neg()
728 return PyComplex_FromCComplex(v->cval); in complex_pos()
737 result = c_abs(v->cval); in complex_abs()
751 return v->cval.real != 0.0 || v->cval.imag != 0.0; in complex_nonzero()
757 Py_complex cval; in complex_coerce() local
758 cval.imag = 0.; in complex_coerce()
760 cval.real = (double)PyInt_AsLong(*pw); in complex_coerce()
761 *pw = PyComplex_FromCComplex(cval); in complex_coerce()
766 cval.real = PyLong_AsDouble(*pw); in complex_coerce()
767 if (cval.real == -1.0 && PyErr_Occurred()) in complex_coerce()
769 *pw = PyComplex_FromCComplex(cval); in complex_coerce()
774 cval.real = PyFloat_AsDouble(*pw); in complex_coerce()
775 *pw = PyComplex_FromCComplex(cval); in complex_coerce()
884 c = ((PyComplexObject *)self)->cval; in complex_conjugate()
897 Py_complex c = v->cval; in complex_getnewargs()
941 c = ((PyComplexObject *)self)->cval;
966 {"real", T_DOUBLE, offsetof(PyComplexObject, cval.real), READONLY,
968 {"imag", T_DOUBLE, offsetof(PyComplexObject, cval.imag), READONLY,
1210 cr = ((PyComplexObject*)r)->cval; in complex_new()
1242 ci = ((PyComplexObject*)i)->cval; in complex_new()