HEX
Server: LiteSpeed
System: Linux standart9.isimtescil.net 3.10.0-962.3.2.lve1.5.26.7.el7.x86_64 #1 SMP Wed Oct 2 07:53:12 EDT 2019 x86_64
User: karalev (5310)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //opt/alt/python37/lib64/python3.7/site-packages/Crypto/Util/__pycache__/_number_new.cpython-37.pyc
B

��c��@sldZdddddgZddlZejddkr>ejd	d	kr>dd
lTdd�Zdd�Zd
d�Zdd�Zddd�Z	dS)z$Id$�
ceil_shift�ceil_div�	floor_div�
exact_log2�	exact_div�N��)�*cCspt|t�rt|t�s0tdt|�jt|�jf��|dkr@|dksDt�d|>d}||@rd||?dS||?SdS)z�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.
    z&unsupported operand type(s): %r and %rrrN)�
isinstance�int�	TypeError�type�__name__�AssertionError)�n�b�mask�r�J/opt/alt/python37/lib64/python3.7/site-packages/Crypto/Util/_number_new.pyr"scCsRt|t�rt|t�s0tdt|�jt|�jf��t||�\}}|rJ|dS|SdS)zDReturn ceil(a / b) without performing any floating-point operations.z&unsupported operand type(s): %r and %rrN)r
rrr
r�divmod)�ar�q�rrrrr2scCsBt|t�rt|t�s0tdt|�jt|�jf��t||�\}}|S)Nz&unsupported operand type(s): %r and %r)r
rrr
rr)rrrrrrrr>scCs�t|t�stdt|�jf��t|�}|dkr6td��d}x4|dkrn|d@r\|dkr\td��|d7}|dL}q<W|d8}|d|>ks�t�|S)z~Find and return an integer i >= 0 such that num == 2**i.

    If no such integer exists, this function raises ValueError.
    zunsupported operand type: %rrz/cannot compute logarithm of non-positive numberrzNo solution could be found)r
rrr
r�
ValueErrorr)Znumr�irrrrEs

FcCs�t|t�rt|t�s0tdt|�jt|�jf��|dkrV|rVd}|||krttd��nt||�\}}|dkrttd��|||ks�t�|S)aFind 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).
    z&unsupported operand type(s): %r and %rrzNo solution could be found)r
rrr
rrrr)�p�dZ
allow_divzerorrrrrr]s
)F)
Z__revision__�__all__�sys�version_infoZCrypto.Util.py21compatrrrrrrrrr�<module>s