Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-19 09:50:40

0001 #ifndef Py_CPYTHON_COMPLEXOBJECT_H
0002 #  error "this header file must not be included directly"
0003 #endif
0004 
0005 typedef struct {
0006     double real;
0007     double imag;
0008 } Py_complex;
0009 
0010 // Operations on complex numbers.
0011 PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);
0012 PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);
0013 PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);
0014 PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex);
0015 PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex);
0016 PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex);
0017 PyAPI_FUNC(double) _Py_c_abs(Py_complex);
0018 
0019 
0020 /* Complex object interface */
0021 
0022 /*
0023 PyComplexObject represents a complex number with double-precision
0024 real and imaginary parts.
0025 */
0026 typedef struct {
0027     PyObject_HEAD
0028     Py_complex cval;
0029 } PyComplexObject;
0030 
0031 PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex);
0032 
0033 PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op);