Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
complexobject.h34 linesDownload Raw Back to cpython
1#ifndef Py_CPYTHON_COMPLEXOBJECT_H2#  error "this header file must not be included directly"3#endif4 5typedef struct {6    double real;7    double imag;8} Py_complex;9 10// Operations on complex numbers.11PyAPI_FUNC(Py_complex) _Py_c_sum(Py_complex, Py_complex);12PyAPI_FUNC(Py_complex) _Py_c_diff(Py_complex, Py_complex);13PyAPI_FUNC(Py_complex) _Py_c_neg(Py_complex);14PyAPI_FUNC(Py_complex) _Py_c_prod(Py_complex, Py_complex);15PyAPI_FUNC(Py_complex) _Py_c_quot(Py_complex, Py_complex);16PyAPI_FUNC(Py_complex) _Py_c_pow(Py_complex, Py_complex);17PyAPI_FUNC(double) _Py_c_abs(Py_complex);18 19 20/* Complex object interface */21 22/*23PyComplexObject represents a complex number with double-precision24real and imaginary parts.25*/26typedef struct {27    PyObject_HEAD28    Py_complex cval;29} PyComplexObject;30 31PyAPI_FUNC(PyObject *) PyComplex_FromCComplex(Py_complex);32 33PyAPI_FUNC(Py_complex) PyComplex_AsCComplex(PyObject *op);34 
codekingpro/portable-devtools · Team Ai