Changeset 391 for python/trunk/Doc/c-api/complex.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/c-api/complex.rst
r2 r391 22 22 23 23 24 .. c type:: Py_complex24 .. c:type:: Py_complex 25 25 26 26 The C structure which corresponds to the value portion of a Python complex … … 35 35 36 36 37 .. c function:: Py_complex _Py_c_sum(Py_complex left, Py_complex right)37 .. c:function:: Py_complex _Py_c_sum(Py_complex left, Py_complex right) 38 38 39 Return the sum of two complex numbers, using the C :c type:`Py_complex`39 Return the sum of two complex numbers, using the C :c:type:`Py_complex` 40 40 representation. 41 41 42 42 43 .. c function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right)43 .. c:function:: Py_complex _Py_c_diff(Py_complex left, Py_complex right) 44 44 45 45 Return the difference between two complex numbers, using the C 46 :c type:`Py_complex` representation.46 :c:type:`Py_complex` representation. 47 47 48 48 49 .. c function:: Py_complex _Py_c_neg(Py_complex complex)49 .. c:function:: Py_complex _Py_c_neg(Py_complex complex) 50 50 51 51 Return the negation of the complex number *complex*, using the C 52 :c type:`Py_complex` representation.52 :c:type:`Py_complex` representation. 53 53 54 54 55 .. c function:: Py_complex _Py_c_prod(Py_complex left, Py_complex right)55 .. c:function:: Py_complex _Py_c_prod(Py_complex left, Py_complex right) 56 56 57 Return the product of two complex numbers, using the C :c type:`Py_complex`57 Return the product of two complex numbers, using the C :c:type:`Py_complex` 58 58 representation. 59 59 60 60 61 .. c function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor)61 .. c:function:: Py_complex _Py_c_quot(Py_complex dividend, Py_complex divisor) 62 62 63 Return the quotient of two complex numbers, using the C :c type:`Py_complex`63 Return the quotient of two complex numbers, using the C :c:type:`Py_complex` 64 64 representation. 65 65 66 If *divisor* is null, this method returns zero and sets 67 :c:data:`errno` to :c:data:`EDOM`. 66 68 67 .. cfunction:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)68 69 69 Return the exponentiation of *num* by *exp*, using the C :ctype:`Py_complex` 70 .. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp) 71 72 Return the exponentiation of *num* by *exp*, using the C :c:type:`Py_complex` 70 73 representation. 74 75 If *num* is null and *exp* is not a positive real number, 76 this method returns zero and sets :c:data:`errno` to :c:data:`EDOM`. 71 77 72 78 … … 75 81 76 82 77 .. c type:: PyComplexObject83 .. c:type:: PyComplexObject 78 84 79 This subtype of :c type:`PyObject` represents a Python complex number object.85 This subtype of :c:type:`PyObject` represents a Python complex number object. 80 86 81 87 82 .. c var:: PyTypeObject PyComplex_Type88 .. c:var:: PyTypeObject PyComplex_Type 83 89 84 This instance of :c type:`PyTypeObject` represents the Python complex number90 This instance of :c:type:`PyTypeObject` represents the Python complex number 85 91 type. It is the same object as ``complex`` and ``types.ComplexType``. 86 92 87 93 88 .. c function:: int PyComplex_Check(PyObject *p)94 .. c:function:: int PyComplex_Check(PyObject *p) 89 95 90 Return true if its argument is a :c type:`PyComplexObject` or a subtype of91 :c type:`PyComplexObject`.96 Return true if its argument is a :c:type:`PyComplexObject` or a subtype of 97 :c:type:`PyComplexObject`. 92 98 93 99 .. versionchanged:: 2.2 … … 95 101 96 102 97 .. c function:: int PyComplex_CheckExact(PyObject *p)103 .. c:function:: int PyComplex_CheckExact(PyObject *p) 98 104 99 Return true if its argument is a :c type:`PyComplexObject`, but not a subtype of100 :c type:`PyComplexObject`.105 Return true if its argument is a :c:type:`PyComplexObject`, but not a subtype of 106 :c:type:`PyComplexObject`. 101 107 102 108 .. versionadded:: 2.2 103 109 104 110 105 .. c function:: PyObject* PyComplex_FromCComplex(Py_complex v)111 .. c:function:: PyObject* PyComplex_FromCComplex(Py_complex v) 106 112 107 Create a new Python complex number object from a C :c type:`Py_complex` value.113 Create a new Python complex number object from a C :c:type:`Py_complex` value. 108 114 109 115 110 .. c function:: PyObject* PyComplex_FromDoubles(double real, double imag)116 .. c:function:: PyObject* PyComplex_FromDoubles(double real, double imag) 111 117 112 Return a new :c type:`PyComplexObject` object from *real* and *imag*.118 Return a new :c:type:`PyComplexObject` object from *real* and *imag*. 113 119 114 120 115 .. c function:: double PyComplex_RealAsDouble(PyObject *op)121 .. c:function:: double PyComplex_RealAsDouble(PyObject *op) 116 122 117 Return the real part of *op* as a C :c type:`double`.123 Return the real part of *op* as a C :c:type:`double`. 118 124 119 125 120 .. c function:: double PyComplex_ImagAsDouble(PyObject *op)126 .. c:function:: double PyComplex_ImagAsDouble(PyObject *op) 121 127 122 Return the imaginary part of *op* as a C :c type:`double`.128 Return the imaginary part of *op* as a C :c:type:`double`. 123 129 124 130 125 .. c function:: Py_complex PyComplex_AsCComplex(PyObject *op)131 .. c:function:: Py_complex PyComplex_AsCComplex(PyObject *op) 126 132 127 Return the :ctype:`Py_complex` value of the complex number *op*. 133 Return the :c:type:`Py_complex` value of the complex number *op*. 134 Upon failure, this method returns ``-1.0`` as a real value. 128 135 129 136 .. versionchanged:: 2.6
Note:
See TracChangeset
for help on using the changeset viewer.