tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
L\¬Qc@ sídZddlmZddlmZmZmZdddddgZdefd    „ƒYZ    de    fd
„ƒYZ
e
j e ƒde
fd „ƒYZ e j eƒde fd „ƒYZdefd „ƒYZej eƒej eƒdS(s~Abstract Base Classes (ABCs) for numbers, according to PEP 3141.
 
TODO: Fill out more detailed documentation on the operators.iÿÿÿÿ(tdivision(tABCMetatabstractmethodtabstractpropertytNumbertComplextRealtRationaltIntegralcB s eZdZeZdZdZRS(sŸAll numbers inherit from this class.
 
    If you just want to check if an argument x is a number, without
    caring what kind, use isinstance(x, Number).
    (N(t__name__t
__module__t__doc__Rt __metaclass__t    __slots__tNonet__hash__(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR scB sFeZdZdZed„ƒZd„Zed„ƒZed„ƒZ    ed„ƒZ
ed„ƒZ ed„ƒZ ed„ƒZ d    „Zd
„Zed „ƒZed „ƒZed „ƒZed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZed„ƒZd„ZRS(saComplex defines the operations that work on the builtin complex type.
 
    In short, those are: a conversion to complex, .real, .imag, +, -,
    *, /, abs(), .conjugate, ==, and !=.
 
    If it is given heterogenous arguments, and doesn't have special
    knowledge about them, it should fall back to the builtin complex
    type as described below.
    cC sdS(s<Return a builtin complex instance. Called for complex(self).N((tself((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __complex__/scC s
|dkS(s)True if self != 0. Called for bool(self).i((R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __nonzero__4scC s
t‚dS(sXRetrieve the real component of this number.
 
        This should subclass Real.
        N(tNotImplementedError(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pytreal8scC s
t‚dS(s]Retrieve the imaginary component of this number.
 
        This should subclass Real.
        N(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pytimag@scC s
t‚dS(s self + otherN(R(Rtother((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__add__HscC s
t‚dS(s other + selfN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__radd__MscC s
t‚dS(s-selfN(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__neg__RscC s
t‚dS(s+selfN(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__pos__WscC s    || S(s self - other((RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__sub__\scC s    | |S(s other - self((RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__rsub__`scC s
t‚dS(s self * otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__mul__dscC s
t‚dS(s other * selfN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__rmul__iscC s
t‚dS(sPself / other without __future__ division
 
        May promote to float.
        N(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__div__nscC s
t‚dS(s(other / self without __future__ divisionN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__rdiv__vscC s
t‚dS(s`self / other with __future__ division.
 
        Should promote to float when necessary.
        N(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __truediv__{scC s
t‚dS(s%other / self with __future__ divisionN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __rtruediv__ƒscC s
t‚dS(sBself**exponent; should promote to float or complex when necessary.N(R(Rtexponent((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__pow__ˆscC s
t‚dS(s base ** selfN(R(Rtbase((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__rpow__scC s
t‚dS(s7Returns the Real distance from 0. Called for abs(self).N(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__abs__’scC s
t‚dS(s$(x+y*i).conjugate() returns (x-y*i).N(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt    conjugate—scC s
t‚dS(s self == otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__eq__œscC s ||k S(s self != other((RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__ne__¡s((R    R
R R RRRRRRRRRRRRRRRR R!R"R$R&R'R(R)R*(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR"s0                cB sÎeZdZdZed„ƒZed„ƒZd„Zd„Zed„ƒZ    ed„ƒZ
ed„ƒZ ed„ƒZ ed    „ƒZ ed
„ƒZd „Zed „ƒZed „ƒZd„ZRS(sÜTo Complex, Real adds the operations that work on real numbers.
 
    In short, those are: a conversion to float, trunc(), divmod,
    %, <, <=, >, and >=.
 
    Real also provides defaults for the derived operations.
    cC s
t‚dS(sTAny Real can be converted to a native float object.
 
        Called for float(self).N(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt    __float__´scC s
t‚dS(sGtrunc(self): Truncates self to an Integral.
 
        Returns an Integral i such that:
          * i>0 iff self>0;
          * abs(i) <= abs(self);
          * for any Integral j satisfying the first two conditions,
            abs(i) >= abs(j) [i.e. i has "maximal" abs among those].
        i.e. "truncate towards 0".
        N(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt    __trunc__»s cC s||||fS(s™divmod(self, other): The pair (self // other, self % other).
 
        Sometimes this can be computed faster than the pair of
        operations.
        ((RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt
__divmod__ÈscC s||||fS(s™divmod(other, self): The pair (self // other, self % other).
 
        Sometimes this can be computed faster than the pair of
        operations.
        ((RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __rdivmod__ÐscC s
t‚dS(s)self // other: The floor() of self/other.N(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __floordiv__ØscC s
t‚dS(s)other // self: The floor() of other/self.N(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __rfloordiv__ÝscC s
t‚dS(s self % otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__mod__âscC s
t‚dS(s other % selfN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__rmod__çscC s
t‚dS(sRself < other
 
        < on Reals defines a total ordering, except perhaps for NaN.N(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__lt__ìscC s
t‚dS(s self <= otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__le__óscC stt|ƒƒS(s(complex(self) == complex(float(self), 0)(tcomplextfloat(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyRùscC s|
S(s&Real numbers are their real component.((R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyRýscC sdS(s)Real numbers have no imaginary component.i((R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyRscC s|
S(sConjugate is a no-op for Reals.((R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR(s((R    R
R R RR+R,R-R.R/R0R1R2R3R4RtpropertyRRR((((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR©s             cB s;eZdZdZed„ƒZed„ƒZd„ZRS(s6.numerator and .denominator should be in lowest terms.cC s
t‚dS(N(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt    numeratorscC s
t‚dS(N(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt denominatorscC s|j|jS(s float(self) = self.numerator / self.denominator
 
        It's important that this conversion use the integer's "true"
        division rather than casting one side to float before dividing
        so that ratios of huge integers convert without overflowing.
 
        (R8R9(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR+s((R    R
R R RR8R9R+(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyRs
cB s
eZdZdZed„ƒZd„Zedd„ƒZed„ƒZ    ed„ƒZ
ed„ƒZ ed„ƒZ ed„ƒZ ed    „ƒZed
„ƒZed „ƒZed „ƒZed „ƒZed„ƒZd„Zed„ƒZed„ƒZRS(sAIntegral adds a conversion to long and the bit-string operations.cC s
t‚dS(s
long(self)N(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__long__,scC s
t|ƒS(s6Called whenever an index is needed, such as in slicing(tlong(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt    __index__1scC s
t‚dS(s4self ** exponent % modulus, but maybe faster.
 
        Accept the modulus argument if you want to support the
        3-argument version of pow(). Raise a TypeError if exponent < 0
        or any argument isn't Integral. Otherwise, just implement the
        2-argument version described in Complex.
        N(R(RR#tmodulus((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR$5s    cC s
t‚dS(s self << otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt
__lshift__@scC s
t‚dS(s other << selfN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __rlshift__EscC s
t‚dS(s self >> otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt
__rshift__JscC s
t‚dS(s other >> selfN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt __rrshift__OscC s
t‚dS(s self & otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__and__TscC s
t‚dS(s other & selfN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__rand__YscC s
t‚dS(s self ^ otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__xor__^scC s
t‚dS(s other ^ selfN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__rxor__cscC s
t‚dS(s self | otherN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__or__hscC s
t‚dS(s other | selfN(R(RR((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt__ror__mscC s
t‚dS(s~selfN(R(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt
__invert__rscC stt|ƒƒS(s float(self) == float(long(self))(R6R;(R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR+xscC s|
S(s"Integers are their own numerators.((R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR8|scC sdS(s!Integers have a denominator of 1.i((R((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR9s(N(R    R
R R RR:R<RR$R>R?R@RARBRCRDRERFRGRHR+R7R8R9(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyR's(    
    N(R t
__future__RtabcRRRt__all__tobjectRRtregisterR5RR6RRtintR;(((sO/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/numbers.pyt<module>s„ b _