Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/Crypto/Util/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/Crypto/Util/_number_new.pyc

ó
T:´Nc@sŽdZdddddgZddlZejdd	krZejd
d
krZddlTnd„Zd
„Zd„Zd„Ze	d„Z
dS(s$Id$t
ceil_shifttceil_divt	floor_divt
exact_log2t	exact_diviÿÿÿÿNiii(t*cCs¥t|ttfƒs,t|ttfƒrWtdt|ƒjt|ƒjfƒ‚n|dkro|dksut‚d|>d}||@r™||?dS||?SdS(sÏReturn ceil(n / 2**b) without performing any floating-point or division operations.

    This is done by right-shifting n by b bits and incrementing the result by 1
    if any '1' bits were shifted out.
    s&unsupported operand type(s): %r and %riliN(t
isinstancetinttlongt	TypeErrorttypet__name__tAssertionError(tntbtmask((s;/usr/lib/python2.7/dist-packages/Crypto/Util/_number_new.pyR"s,+
cCs‚t|ttfƒs,t|ttfƒrWtdt|ƒjt|ƒjfƒ‚nt||ƒ\}}|rz|dS|SdS(sDReturn ceil(a / b) without performing any floating-point operations.s&unsupported operand type(s): %r and %riN(RRRR	R
Rtdivmod(taRtqtr((s;/usr/lib/python2.7/dist-packages/Crypto/Util/_number_new.pyR2s,+cCspt|ttfƒs,t|ttfƒrWtdt|ƒjt|ƒjfƒ‚nt||ƒ\}}|S(Ns&unsupported operand type(s): %r and %r(RRRR	R
RR(RRRR((s;/usr/lib/python2.7/dist-packages/Crypto/Util/_number_new.pyR>s,+cCsÑt|ttfƒs4tdt|ƒjfƒ‚nt|ƒ}|dkr[tdƒ‚nd}xI|dkr¬|d@r•|dkr•tdƒ‚n|d7}|dL}qdW|d8}|d|>ksÍt‚|S(s~Find and return an integer i >= 0 such that num == 2**i.

    If no such integer exists, this function raises ValueError.
    sunsupported operand type: %ris/cannot compute logarithm of non-positive numberisNo solution could be foundl(RRRR	R
Rt
ValueErrorR(tnumR
ti((s;/usr/lib/python2.7/dist-packages/Crypto/Util/_number_new.pyREs

cCsÛt|ttfƒs,t|ttfƒrWtdt|ƒjt|ƒjfƒ‚n|dkr‘|r‘d}|||krÁtdƒ‚qÁn0t||ƒ\}}|dkrÁtdƒ‚n|||ks×t‚|S(sFind and return an integer n such that p == n * d

    If no such integer exists, this function raises ValueError.

    Both operands must be integers.

    If the second operand is zero, this function will raise ZeroDivisionError
    unless allow_divzero is true (default: False).
    s&unsupported operand type(s): %r and %risNo solution could be found(	RRRR	R
RRRR(tptdt
allow_divzeroR
R((s;/usr/lib/python2.7/dist-packages/Crypto/Util/_number_new.pyR]s,+(t__revision__t__all__tsystversion_infotCrypto.Util.py21compatRRRRtFalseR(((s;/usr/lib/python2.7/dist-packages/Crypto/Util/_number_new.pyt<module>s&