
    i1              	          S SK J r   S SKJrJr   SrSr\S-
  \-
  rS\S\4S jr	\ " S	\
" \" \S-   5      \	S
95      r\ " S	S /5      \" \5      -  r\" \5       H  u  rr\\\'   M     CCS\S\4S jrS\S\4S jrS\S\4S jr\" \" \\" S5      5      5      rS\S\4S jrSrS\S\S\4S jrS\S\S\4S jrS\S\4S jrS\S\4S jrS\S\4S jrS\S\4S jrg)     )array)float_to_intint_to_float  i     ereturnc                 X    U [         :X  a  [        S5      $ U [        -
  nUS:  a  SU-
  $ U$ )Ninfr   i'  )MAX_EXPONENTfloatBIAS)r   unbiaseds     d/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/internal/conjecture/floats.pyexponent_keyr   R   s4    LU|4xH!|x    H)keyc                 @    SU s=::  a  [         ::  d   e   e[        U    $ )zTake an integer and turn it into a suitable floating point exponent
such that lexicographically simpler leads to simpler floats.r   )r   ENCODING_TABLEr   s    r   decode_exponentr   e   (     !\!!!!!!r   c                 @    SU s=::  a  [         ::  d   e   e[        U    $ )z[Take a floating point exponent and turn it back into the equivalent
result from conjecture.r   )r   DECODING_TABLEr   s    r   encode_exponentr   l   r   r   bc                 P    Sn[        S5       H  nUS-  nXS-  -  nU S-  n M     U$ )Nr      r   )range)r   result_s      r   reverse_byter#   s   s9    F1X1a%	a  Mr      vc                 \   U R                  5       S::  d   e[        U S-	  S-     S-  [        U S-	  S-     S-  -  [        U S-	  S-     S-  -  [        U S	-	  S-     S
-  -  [        U S
-	  S-     S	-  -  [        U S-	  S-     S-  -  [        U S-	  S-     S-  -  [        U S-	  S-     S-  -  $ )a  Reverse a 64-bit integer bitwise.

We do this by breaking it up into 8 bytes. The 64-bit integer is then the
concatenation of each of these bytes. We reverse it by reversing each byte
on its own using the REVERSE_BITS_TABLE above, and then concatenating the
reversed bytes.

In this case concatenating consists of shifting them into the right
position for the word and then oring the bits together.
@   r      8   r   0      (          )
bit_lengthREVERSE_BITS_TABLE)r%   s    r   	reverse64r1      s     <<>R	Q!VtO	,	2qAvo."4	6qBw$./25	7 qBw$./25	7 qBw$./25		7
 qBw$./25	7 qBw$./14	6 qBw$./14	6	r   l    xnc                 l    U R                  5       Us=::  a  S::  d   e   e[        U 5      n U SU-
  -  n U $ )Nr'   )r/   r1   )r2   r3   s     r   reverse_bitsr5      s<    <<>Q$"$$$$$!A"q&LAHr   unbiased_exponentmantissac                 ~    U S::  a  [        US5      nU$ U S::  a"  SU -
  nUSU-  S-
  -  nX-  nU[        X25      -  nU$ )Nr   4   3   r   )r5   )r6   r7   n_fractional_bitsfractional_parts       r   update_mantissar=      sd    A"- O 
b	 !22"q,='=&BC#LDDOr   ic                    U R                  5       S::  d   eU S-	  nU(       aV  U S-	  S-  n[        U5      nU [        -  n[        U[        -
  U5      nUR                  5       S::  d   e[        US-  U-  5      $ U S-  n[        U5      $ )Nr'   ?   r9   r   l   )r/   r   MANTISSA_MASKr=   r   r   r   )r>   has_fractional_partexponentr7   integral_parts        r   lex_to_floatrE      s    <<>Rr'G."8,}$"8d?H=""$***X^x788]+]##r   fc                 ^    [        U 5      (       a  U S:  d   e[        U 5      $ [        U 5      $ )Nr   )	is_simpleintbase_float_to_lex)rF   s    r   float_to_lexrK      s*    ||Avv1vQr   c                     [        U 5      nUS-  nUS-	  nU[        -  n[        U[        -
  U5      n[	        U5      nUR                  5       S::  d   eSUS-  -  U-  $ )Nl    r9   l            )r   rA   r=   r   r   r/   )rF   r>   rC   r7   s       r   rJ   rJ      sm    QAABwH= Hx$9Hx(H B&&&B'(22r   c                 x     [        U 5      nX:w  a  gUR                  5       S:*  $ ! [        [        4 a     gf = f)NFr)   )rI   
ValueErrorOverflowErrorr/   )rF   r>   s     r   rH   rH      sD    F 	v<<>R	 & s   & 99N) r   hypothesis.internal.floatsr   r   r   r   MAX_POSITIVE_EXPONENTrI   r   r   sortedr    r   lenr   	enumerater>   r   r   r   r#   	bytearraymapr0   r1   rA   r5   r=   rE   rK   rJ   rH    r   r   <module>rX      s    A:z $q(4/ C E  sF5)9#:MNsQC3~#66n%DAqN1 & qs s s s C C  s<s<=   0 C C C s c c $C $E $" E  c  	3 	33 	3   3  r   