• Home
  • Raw
  • Download

Lines Matching refs:imag

30     r.imag = a.imag + b.imag;  in _Py_c_sum()
39 r.imag = a.imag - b.imag; in _Py_c_diff()
48 r.imag = -a.imag; in _Py_c_neg()
56 r.real = a.real*b.real - a.imag*b.imag; in _Py_c_prod()
57 r.imag = a.real*b.imag + a.imag*b.real; in _Py_c_prod()
93 const double abs_bimag = b.imag < 0 ? -b.imag : b.imag; in _Py_c_quot()
99 r.real = r.imag = 0.0; in _Py_c_quot()
102 const double ratio = b.imag / b.real; in _Py_c_quot()
103 const double denom = b.real + b.imag * ratio; in _Py_c_quot()
104 r.real = (a.real + a.imag * ratio) / denom; in _Py_c_quot()
105 r.imag = (a.imag - a.real * ratio) / denom; in _Py_c_quot()
110 const double ratio = b.real / b.imag; in _Py_c_quot()
111 const double denom = b.real * ratio + b.imag; in _Py_c_quot()
112 assert(b.imag != 0.0); in _Py_c_quot()
113 r.real = (a.real * ratio + a.imag) / denom; in _Py_c_quot()
114 r.imag = (a.imag * ratio - a.real) / denom; in _Py_c_quot()
118 r.real = r.imag = Py_NAN; in _Py_c_quot()
131 if (b.real == 0. && b.imag == 0.) { in _Py_c_pow()
133 r.imag = 0.; in _Py_c_pow()
135 else if (a.real == 0. && a.imag == 0.) { in _Py_c_pow()
136 if (b.imag != 0. || b.real < 0.) in _Py_c_pow()
139 r.imag = 0.; in _Py_c_pow()
142 vabs = hypot(a.real,a.imag); in _Py_c_pow()
144 at = atan2(a.imag, a.real); in _Py_c_pow()
146 if (b.imag != 0.0) { in _Py_c_pow()
147 len /= exp(at*b.imag); in _Py_c_pow()
148 phase += b.imag*log(vabs); in _Py_c_pow()
151 r.imag = len*sin(phase); in _Py_c_pow()
188 if (!Py_IS_FINITE(z.real) || !Py_IS_FINITE(z.imag)) { in _Py_c_abs()
197 if (Py_IS_INFINITY(z.imag)) { in _Py_c_abs()
198 result = fabs(z.imag); in _Py_c_abs()
206 result = hypot(z.real, z.imag); in _Py_c_abs()
239 complex_subtype_from_doubles(PyTypeObject *type, double real, double imag) in complex_subtype_from_doubles() argument
243 c.imag = imag; in complex_subtype_from_doubles()
248 PyComplex_FromDoubles(double real, double imag) in PyComplex_FromDoubles() argument
252 c.imag = imag; in PyComplex_FromDoubles()
271 return ((PyComplexObject *)op)->cval.imag; in PyComplex_ImagAsDouble()
327 cv.imag = 0.; in PyComplex_AsCComplex()
370 im = PyOS_double_to_string(v->cval.imag, format_code, in complex_repr()
387 im = PyOS_double_to_string(v->cval.imag, format_code, in complex_repr()
411 hashimag = (Py_uhash_t)_Py_HashDouble((PyObject *)v, v->cval.imag); in complex_hash()
438 pc->real = pc->imag = 0.0; in to_complex()
521 if (b.imag == 0.0 && b.real == floor(b.real) && fabs(b.real) <= 100.0) { in complex_pow()
528 Py_ADJUST_ERANGE2(p.real, p.imag); in complex_pow()
547 neg.imag = -v->cval.imag; in complex_neg()
580 return v->cval.real != 0.0 || v->cval.imag != 0.0; in complex_bool()
601 if (i.imag == 0.0) { in complex_richcompare()
616 equal = (i.real == PyFloat_AsDouble(w) && i.imag == 0.0); in complex_richcompare()
622 equal = (i.real == j.real && i.imag == j.imag); in complex_richcompare()
651 c.imag = -c.imag; in complex_conjugate_impl()
665 return Py_BuildValue("(dd)", c.real, c.imag); in complex___getnewargs___impl()
706 {"imag", T_DOUBLE, offsetof(PyComplexObject, cval.imag), READONLY,
985 cr.imag = 0.0; in complex_new_impl()
989 ci.real = cr.imag; in complex_new_impl()
1009 cr.real -= ci.imag; in complex_new_impl()
1012 ci.real += cr.imag; in complex_new_impl()