Ë
    iKêj�  ã                   óž   — d dl Z d dlZd dlmZ d dlmZ d dlmZ d dlm	Z	m
Z
mZ  e
 ee	«      «      Zdedefd„Zd	edefd
„Z G d„ de«      Zy)é    N©Úfloat_to_lex)ÚShrinker)ÚInteger)ÚMAX_PRECISE_INTEGERÚfloat_to_intÚint_to_floatÚfÚreturnc                 ó\   — | t         k  rt        | «      S t         t        | «      t        z
  z   S )aÀ  Map a non-negative float to a linear integer position such that adjacent
    representable floats correspond to adjacent integers.

    For ``f <= MAX_PRECISE_INTEGER`` the position is just ``int(f)``. Above the
    boundary, where the gap between adjacent floats exceeds 1, we extend by the
    float's index in the bit-pattern sequence past ``MAX_PRECISE_INTEGER``, so
    that decrementing the position by 1 corresponds to ``next_down(f)``.
    )r   Úintr   Ú_BOUNDARY_BITS)r
   s    út/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/hypothesis/internal/conjecture/shrinking/floats.pyÚ_float_to_positionr      s*   € ð 	ÔÒÜ�1‹vˆÜ¤,¨q£/´NÑ"BÑCÐCó    Únc                 ó\   — | t         k  rt        | «      S t        t        | t         z
  z   «      S )z|Inverse of :func:`_float_to_position` on the integer-valued range. Always
    returns an integer-valued, non-negative float.)r   Úfloatr	   r   )r   s    r   Ú_position_to_floatr   &   s,   € ð 	ÔÒÜ�Q‹xˆÜœ¨!Ô.AÑ*AÑBÓCÐCr   c                   ó0   — e Zd Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zy)ÚFloatc                 ó   — d| _         y ©NT)Údebugging_enabled)Úselfs    r   ÚsetupzFloat.setup/   s
   € Ø!%ˆÕr   c                 óJ   — t        j                  |«      rdt        |«      fS |S )NÚnan)ÚmathÚisnanr   ©r   Úvalues     r   Úmake_canonicalzFloat.make_canonical2   s%   € Ü�:‰:�eÔð œ<¨Ó.Ð/Ð/Øˆr   c                 ó   — |dk  rJ ‚y )Nr   © r!   s     r   Úcheck_invariantszFloat.check_invariants9   s   € ð ˜A’IÐˆ�Ir   c                 ó8   — t        |«      }t        |«      }||k  S ©Nr   )r   ÚleftÚrightÚlex1Úlex2s        r   Úleft_is_betterzFloat.left_is_better>   s    € Ü˜DÓ!ˆÜ˜EÓ"ˆØ�d‰{Ðr   c                 óâ   — t         j                  j                  t        j                  t        j
                  fD ]  }| j                  |«       Œ t        j                  | j                  «      syy r   )	ÚsysÚ
float_infoÚmaxr   Úinfr   ÚconsiderÚisfiniteÚcurrent)r   Úgs     r   Úshort_circuitzFloat.short_circuitC   sR   € ô
 —.‘.×$Ñ$¤d§h¡h´·±Ð9ò 	ˆAØ�M‰M˜!Õð	ô �}‰}˜TŸ\™\Ô*Øð +r   c                 óv  ‡ ‡‡— ‰ j                   t        kD  r!‰ j                  t        t        t
        ¬«       y t        d«      D ]V  }‰ j                   d|z  z  }t        j                  t        j                  fD ]  }‰ j                   ||«      d|z  z  «       Œ! ŒX ‰ j                  t        ‰ j                   «      «      r2‰ j                  d«       ‰ j                  t        t        t        ¬«       y ‰ j                   j                  «       \  }Št        |‰«      \  }Š‰ j!                  t        |ˆˆˆ fd„«       y )N)Ú
convert_toÚconvert_fromé
   é   zJust an integer nowc                 ó8   •— ‰j                  | ‰z  ‰z   ‰z  «      S r(   )r3   )Úkr   Úrr   s    €€€r   ú<lambda>z Float.run_step.<locals>.<lambda>|   s   ø€ °·±ÀÀAÁÈÁ	ÈQ¹Ó1O€ r   )r5   r   Údelegater   r   r   Úranger   ÚfloorÚceilr3   r   Údebugr   Úas_integer_ratioÚdivmodÚcall_shrinker)r   ÚpÚscaledÚtruncateÚmÚir   r?   s   `     @@r   Úrun_stepzFloat.run_stepO   s  ú€ ð �<‰<Ô-Ò-Ø�M‰MÜÜ-Ü/ð ô ð
 ô" �r“ò 	7ˆAØ—\‘\ A q¡DÑ(ˆFÜ!ŸZ™Z¬¯©Ð3ò 7�Ø—‘™h vÓ.°°A±Ñ5Õ6ñ7ð	7ð
 �=‰=œ˜TŸ\™\Ó*Ô+Ø�J‰JÐ,Ô-Ø�M‰Mœ'¬cÄˆMÔFØð
 �|‰|×,Ñ,Ó.‰ˆˆ1Ü�a˜‹|‰ˆˆ1Ø×Ñœ7 AÕ'OÕPr   N)	Ú__name__Ú
__module__Ú__qualname__r   r#   r&   r-   r7   rN   r%   r   r   r   r   .   s!   „ ò&òòò
ò

ó-Qr   r   )r   r/   Ú%hypothesis.internal.conjecture.floatsr   Ú/hypothesis.internal.conjecture.shrinking.commonr   Ú0hypothesis.internal.conjecture.shrinking.integerr   Úhypothesis.internal.floatsr   r   r	   r   r   r   r   r   r   r%   r   r   ú<module>rV      sj   ðó Û 
å >Ý DÝ Dß VÑ Vñ ™eÐ$7Ó8Ó9€ðD˜%ð D Có DðD˜#ð D %ó DôNQˆHõ NQr   