HEX
Server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/8.4.25
System: Windows NT DESKTOP-4TAV2RJ 10.0 build 19045 (Windows 10) AMD64
User: fred (0)
PHP: 8.4.25
Disabled: NONE
Upload Files
File: C:/Users/fred/anaconda3/Tools/scripts/__pycache__/divmod_threshold.cpython-312.pyc
�

�X�f���X�ddlmZddlmZddlmZdZd�Z	d�Z
d�Zedk(re�y	y	)
�)�	randrange)�perf_counter)�
int_divmod�c�8�d|tzz}t|dz	|�S)N�)�BITS_PER_DIGITr)�n�tops  �!Tools\scripts\divmod_threshold.py�rand_digitsr

s"��
��N�"�
#�C��S�A�X�s�#�#�c�j�t|�}d}t||dz�D]�}t|�}t�}t||�\}}t�}t	||�\}	}
t�}||z
}||z
}
||	k(sJ�||
k(sJ�|
|kr|dz
}|dk\s�rtd|d||z
d�yd}��td|d�y)	Nri�r��forz
denom digits,zextra num digits is enoughz%denom digits, no num seems big enough)r
�range�now�divmod�divmod_fast�print)�nd�den�count�nn�num�t0�e1�e2�t1�f1�f2�t2�s1�s2s              r�	probe_denr%s���
�b�/�C�
�E��B��T�	�"���"�o��
�U����S�!���B�
�U���S�#�&���B�
�U��
�"�W��
�"�W���R�x��x��R�x��x�
��7��Q�J�E���z����#���G�0����E�/#�2	�e�R�@�Arc�J�td�D]}|dzdz}t|��y)Nrr�d)rr%)rs r�mainr(1s$���B�i���1�f��^���"�
�r�__main__N)
�randomr�timerr�_pylongrrr	r
r%r(�__name__�rr�<module>r/s9���$�-���$�
B�>��z���F�r