Ë
    èÿæiäE  ã                   ó¨  — d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZm	Z	 d dl
mZ d dlmZ d dlmZ d„ Zd„ Zd„ Zd	„ Zd
„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z d„ Z!d„ Z"d„ Z#d„ Z$d„ Z%d„ Z&d„ Z'd„ Z(d„ Z)d „ Z*d!„ Z+d"„ Z,d#„ Z-d$„ Z.d%„ Z/d&„ Z0d'„ Z1d(„ Z2d)„ Z3d*„ Z4d+„ Z5d,„ Z6d-„ Z7d.„ Z8d/„ Z9 G d0„ d1e«      Z:e;d2k(  r ejx                  «        yy)3é    N)ÚnjitÚtypes)ÚTestCase)Únumpy_support)Ú	PYVERSIONc                 ó,   — t        j                  | «      S ©N)ÚmathÚsin©Úxs    úm/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/numba/tests/test_mathlib.pyr   r      ó   € Ü�8‰8�A‹;Ðó    c                 ó,   — t        j                  | «      S r	   )r
   Úcosr   s    r   r   r      r   r   c                 ó,   — t        j                  | «      S r	   )r
   Útanr   s    r   r   r      r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úsinhr   s    r   r   r      ó   € Ü�9‰9�Q‹<Ðr   c                 ó,   — t        j                  | «      S r	   )r
   Úcoshr   s    r   r   r      r   r   c                 ó,   — t        j                  | «      S r	   )r
   Útanhr   s    r   r   r   #   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úasinr   s    r   r   r   '   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úacosr   s    r   r   r   +   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úatanr   s    r   r!   r!   /   r   r   c                 ó.   — t        j                  | |«      S r	   )r
   Úatan2)Úyr   s     r   r#   r#   3   ó   € Ü�:‰:�a˜ÓÐr   c                 ó,   — t        j                  | «      S r	   )r
   Úasinhr   s    r   r'   r'   7   ó   € Ü�:‰:�a‹=Ðr   c                 ó,   — t        j                  | «      S r	   )r
   Úacoshr   s    r   r*   r*   ;   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úatanhr   s    r   r,   r,   ?   r(   r   c                 ó,   — t        j                  | «      S r	   ©r
   Úsqrtr   s    r   r/   r/   C   r   r   c                 ó,   — t        j                  | «      S r	   )Únpr/   r   s    r   Únpy_sqrtr2   G   s   € Ü�7‰7�1‹:Ðr   c                 ó,   — t        j                  | «      S r	   )r
   Úexpr   s    r   r4   r4   K   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úexp2r   s    r   r6   r6   N   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úexpm1r   s    r   r8   r8   Q   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úlogr   s    r   r:   r:   U   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úlog1pr   s    r   r<   r<   Y   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úlog10r   s    r   r>   r>   ]   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úlog2r   s    r   r@   r@   a   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úfloorr   s    r   rB   rB   e   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úceilr   s    r   rD   rD   i   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Útruncr   s    r   rF   rF   m   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úisnanr   s    r   rH   rH   q   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úisinfr   s    r   rJ   rJ   u   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úisfiniter   s    r   rL   rL   y   s   € Ü�=‰=˜ÓÐr   c                 ó.   — t        j                  | |«      S r	   )r
   Úhypot©r   r$   s     r   rN   rN   }   r%   r   c                 ó.   — t        j                  | |«      S r	   )r
   Ú	nextafterrO   s     r   rQ   rQ   �   s   € Ü�>‰>˜!˜QÓÐr   c                 ó,   — t        j                  | «      S r	   )r
   Údegreesr   s    r   rS   rS   …   ó   € Ü�<‰<˜‹?Ðr   c                 ó,   — t        j                  | «      S r	   )r
   Úradiansr   s    r   rV   rV   ‰   rT   r   c                 ó,   — t        j                  | «      S r	   )r
   Úerfr   s    r   rX   rX   �   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úerfcr   s    r   rZ   rZ   ‘   r   r   c                 ó,   — t        j                  | «      S r	   )r
   Úgammar   s    r   r\   r\   •   r(   r   c                 ó,   — t        j                  | «      S r	   )r
   Úlgammar   s    r   r^   r^   ™   s   € Ü�;‰;�q‹>Ðr   c                 ó.   — t        j                  | |«      S r	   )r
   ÚpowrO   s     r   r`   r`   �   ó   € Ü�8‰8�A�q‹>Ðr   c                 ó.   — t        j                  | |«      S r	   )r
   ÚgcdrO   s     r   rc   rc       ra   r   c                 ó.   — t        j                  | |«      S r	   )r
   ÚcopysignrO   s     r   re   re   £   s   € Ü�=‰=˜˜AÓÐr   c                 ó,   — t        j                  | «      S r	   )r
   Úfrexpr   s    r   rg   rg   §   r(   r   c                 ó.   — t        j                  | |«      S r	   )r
   Úldexp)r   Úes     r   ri   ri   «   r%   r   c                  óB   — t         j                  t         j                  fS r	   )r
   Úpirj   © r   r   Úget_constantsrn   ¯   s   € Ü�7‰7”D—F‘Fˆ?Ðr   c                   ó–  — e Zd Zd„ Zd3d„Zd3d„Zd„ Zd„ Z ej                  e
j                  dk(  d«      d„ «       Zd	„ Zd
„ Zd„ Zd„ Z ej"                  edk\  d«      d„ «       Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z d„ Z!d„ Z"d„ Z#d „ Z$d!„ Z%d"„ Z&d#„ Z'd$„ Z(d%„ Z)d&„ Z*d'„ Z+d(„ Z,d)„ Z-d*„ Z.d+„ Z/d,„ Z0d-„ Z1d.„ Z2d/„ Z3d0„ Z4d1„ Z5y2)4ÚTestMathLibc                 ól   — t        t        «      }| j                   |«       |j                  «       «       y r	   )r   rn   ÚassertPreciseEqualÚpy_func)ÚselfÚcfuncs     r   Útest_constantszTestMathLib.test_constantsµ   s$   € Ü”]Ó#ˆØ×Ñ¡£¨¯©«Õ9r   c                 óÆ   — t        |«      }t        ||«      D ]G  \  }} ||«      }	 ||«      }
|t        j                  u rdn|}d|›�} | j                  |	|
f||dœ|¤Ž ŒI y )NÚsingleú
for input ©ÚprecÚmsg©r   Úzipr   Úfloat32rr   )rt   ÚpyfuncÚx_typesÚx_valuesr{   Úkwargsru   ÚtxÚvxÚgotÚexpectedÚactual_precr|   s                r   Ú	run_unaryzTestMathLib.run_unary¹   sq   € Ü�V“ˆÜ˜' 8Ö,‰FˆB�Ù˜“)ˆCÙ˜b“zˆHØ&(¬E¯M©MÑ&9™(¸t‰KÙ$&Ð(ˆCØ#ˆD×#Ñ# C¨ð .¸Èñ .Ø&,ó.ñ -r   c                 óÒ   — t        |«      }t        |||«      D ]L  \  }}}	 |||	«      }
 |||	«      }|t        j                  u rdn|}d|›d|	›d�}| j	                  |
|||¬«       ŒN y )Nrx   zfor inputs (z, Ú)rz   r}   )rt   r€   r�   r‚   Úy_valuesr{   ru   Útyr   r$   r†   r‡   rˆ   r|   s                 r   Ú
run_binaryzTestMathLib.run_binaryÃ   sm   € Ü�V“ˆÜ˜G X¨xÖ8‰HˆB��1Ù˜˜1“+ˆCÙ˜a “|ˆHØ&(¬E¯M©MÑ&9™(¸t‰KÚ+,ªaÐ0ˆCØ×#Ñ# C¨¸ÈÐ#ÕMñ 9r   c                 óú  — t         j                  t         j                  t         j                  t         j                  t         j
                  t         j                  t         j                  t         j                  t         j                  t         j                  t         j                  t         j                  g}ddddddt        d«      dt        d«      t        d«      dt        d«      g}| j                  |||«       y )Nr   Úinfç        Únan)r   Úint16Úint32Úint64Úuint16Úuint32Úuint64r   Úfloat64Úfloatr‰   ©rt   r€   r�   r‚   s       r   Úcheck_predicate_funcz TestMathLib.check_predicate_funcÌ   sœ   € Ü—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-´·±Ü—=‘=¤%§-¡-´·±ð@ˆð �q˜!˜Q  1Ü˜%“L #¤u¨U£|Ü˜%“L #¤u¨U£|ð5ˆð 	�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y ©N©éþÿÿÿéÿÿÿÿr    é   é   r¢   çš™™™™™¹?çš™™™™™É?)r   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Útest_sinzTestMathLib.test_sinÖ   óX   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 1ˆØ�‰�v˜w¨Õ1r   Úwin32z'not exactly equal on win32 (issue #597)c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rž   )r   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Útest_coszTestMathLib.test_cosÞ   sZ   € ô ˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 1ˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rž   )r   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Útest_tanzTestMathLib.test_tanè   r§   r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y )N©r¢   r£   r¢   r¢   r£   r¢   r¤   r¥   )r/   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_sqrtzTestMathLib.test_sqrtð   óX   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò .ˆØ�‰�v˜w¨Õ1r   c                 ó`  — t         }g d¢}t        j                  t        j                  g}| j	                  |||d¬«       t        j
                  t        j                  t        j                  t        j                  t        j                  t        j                  g}| j	                  |||«       y )Nr®   rx   ©r{   )r2   r   r“   r–   r‰   r”   r•   r—   r˜   r   r™   ©rt   r€   r‚   r�   s       r   Útest_npy_sqrtzTestMathLib.test_npy_sqrtø   sr   € ÜˆÚ-ˆä—;‘;¤§¡Ð-ˆØ�‰�v˜w¨°xˆÔ@Ü—;‘;¤§¡Ü—<‘<¤§¡Ü—=‘=¤%§-¡-ð1ˆð 	�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rž   )r4   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Útest_expzTestMathLib.test_exp  r§   r   )é   é   zneeds Python 3.11+c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rž   )r6   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_exp2zTestMathLib.test_exp2  sX   € äˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 1ˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rž   )r8   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú
test_expm1zTestMathLib.test_expm1  sX   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 1ˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y ©N)r£   é
   éd   iè  i † i@B r¤   gš™™™™™ñ?)r:   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Útest_logzTestMathLib.test_log  sY   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò AˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y r¾   )r<   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú
test_log1pzTestMathLib.test_log1p$  óY   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò AˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y r¾   )r>   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú
test_log10zTestMathLib.test_log10,  rÄ   r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y r¾   )r@   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_log2zTestMathLib.test_log24  sY   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò AˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y ©N©r£   r£   r£   r£   r£   r£   ç      ð?rÌ   )r   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_asinzTestMathLib.test_asin<  r°   r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rÊ   )r   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_acoszTestMathLib.test_acosD  r°   r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rž   )r!   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_atanzTestMathLib.test_atanL  sX   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 1ˆØ�‰�v˜w¨Õ1r   c                 ób  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}|D �cg c]  }|dz  ‘Œ	 }}| j                  ||||«       y c c}w ©NrŸ   r¢   )r#   r   r“   r”   r•   r–   r—   r˜   r   r™   rŽ   ©rt   r€   r�   r‚   r   rŒ   s         r   Ú
test_atan2zTestMathLib.test_atan2T  sw   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 1ˆÙ#+Ó,¡8˜a�A˜“E 8ˆÐ,Ø�‰˜ ¨°8Õ<ùò -ó   Â	B,c                 ó6  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||d¬«       y )NrË   Údoubler²   )r'   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú
test_asinhzTestMathLib.test_asinh]  s\   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò .ˆØ�‰�v˜w¨°xˆÕ@r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rÊ   )r*   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú
test_acoshzTestMathLib.test_acoshe  sX   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò .ˆØ�‰�v˜w¨Õ1r   c                 ó6  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||d¬«       y )N©r   r   r   r   r   r   r¤   r¤   rØ   r²   )r,   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú
test_atanhzTestMathLib.test_atanhm  s\   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 0ˆØ�‰�v˜w¨°xˆÕ@r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rÊ   )r   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_sinhzTestMathLib.test_sinhu  r°   r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rÊ   )r   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_coshzTestMathLib.test_cosh}  r°   r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y )NrÝ   )r   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_tanhzTestMathLib.test_tanh…  óX   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 0ˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y ©N)r   r   r   r   r   r   r¤   gffffffþ?)rB   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú
test_floorzTestMathLib.test_floor�  óX   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 0ˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rç   )rD   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú	test_ceilzTestMathLib.test_ceil•  rå   r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rç   )rF   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Ú
test_trunczTestMathLib.test_trunc�  ré   r   c                 ó.   — | j                  t        «       y r	   )rœ   rH   ©rt   s    r   Ú
test_isnanzTestMathLib.test_isnan¥  ó   € Ø×!Ñ!¤%Õ(r   c                 ó.   — | j                  t        «       y r	   )rœ   rJ   rï   s    r   Ú
test_isinfzTestMathLib.test_isinf¨  rñ   r   c                 ó.   — | j                  t        «       y r	   )rœ   rL   rï   s    r   Útest_isfinitezTestMathLib.test_isfinite«  s   € Ø×!Ñ!¤(Õ+r   c           	      ó,  — t         }t        j                  t        j                  t        j                  t        j
                  g}g d¢}|D �cg c]  }|dz   ‘Œ	 }}d}| j                  |||||«       d„ }t        |«      }t        j                  t        j
                  fD ]á  }	t        j                  |	«      j                  }
 |
t        j                  |
«      j                  dz  «      } |||«      }| j                  | |||«      d¬«       | j                  t        j                   |«      «       t#        j$                  «       5  t#        j&                  dt(        «       | j+                  t(        d|||«       d d d «       Œã y c c}w # 1 sw Y   ŒóxY w)	N)r£   r¢   r·   é   é   é   çáz®GáÊ?çÃõ(\�ÂÕ?r¢   rx   c                 ó>   — t        j                  | | z  ||z  z   «      S r	   r.   rO   s     r   Únaive_hypotz+TestMathLib.test_hypot.<locals>.naive_hypotº  s   € Ü—9‘9˜Q ™U Q¨¡U™]Ó+Ð+r   g      >@r²   Úerrorz overflow encountered in .*scalar)rN   r   r•   r˜   r   r™   rŽ   r   r   Úas_dtypeÚtyper1   ÚfinfoÚmaxrr   Ú
assertTruerL   ÚwarningsÚcatch_warningsÚsimplefilterÚRuntimeWarningÚassertRaisesRegex)rt   r€   r�   r‚   r   rŒ   r{   rý   ru   ÚflttyÚdtÚvalÚnb_anss                r   Ú
test_hypotzTestMathLib.test_hypot®  s@  € ÜˆÜ—;‘;¤§¡Ü—=‘=¤%§-¡-ð1ˆâ/ˆÙ#+Ó,¡8˜a�A˜“E 8ˆÐ,àˆØ�‰˜ ¨°8¸TÔBò	,ô �V“ˆÜ—m‘m¤U§]¡]Ó3ˆEÜ×'Ñ'¨Ó.×3Ñ3ˆBÙ”R—X‘X˜b“\×%Ñ%¨Ñ+Ó,ˆCÙ˜3 “_ˆFØ×#Ñ# F©F°3¸Ó,<À8Ð#ÔLØ�O‰OœBŸK™K¨Ó/Ô0ä×(Ñ(Õ*Ü×%Ñ% g¬~Ô>Ø×&Ñ&¤~Ø(JØ(3°S¸#ô?÷ +Ð*ñ 4ùò -÷$ +Ð*ús   ÁFÅ4F
Æ
F	c                 óF  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  g}g d¢}|D �cg c]  }|dz   ‘Œ	 }}|D �cg c]  }|dz
  ‘Œ	 }}| j                  ||||«       | j                  ||||«       | j                  ||g d¢t        j                  gdz  «       | j                  ||g d¢t        j                   gdz  «       | j                  ||||«       y c c}w c c}w )N)r‘   rú   rû   g%�Œ®.Ag‡ÙÎ÷S9Àr¢   )r‘   ç      à¿ç      à?r·   )rQ   r   r   r™   r”   r•   r—   r˜   rŽ   r
   r�   )rt   r€   r�   r‚   r   Ú	y1_valuesÚ	y2_valuess          r   Útest_nextafterzTestMathLib.test_nextafterË  sè   € ÜˆÜ—=‘=¤%§-¡-Ü—;‘;¤§¡Ü—<‘<¤§¡ð/ˆò 9ˆÙ$,Ó-¡H˜q�Q˜“U Hˆ	Ð-Ù$,Ó-¡H˜q�Q˜“U Hˆ	Ð-à�‰˜ ¨°9Ô=Ø�‰˜ ¨°9Ô=ð 	�‰˜ ª¼$¿(¹(¸ÀA¹ÔFØ�‰˜ ª¼4¿8¹8¸)¸ÀQ¹ÔGð 	�‰˜ ¨°8Õ<ùò .ùÚ-s   Á+DÁ=Dc                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rÊ   )rS   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Útest_degreeszTestMathLib.test_degreesÞ  óX   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò .ˆØ�‰�v˜w¨Õ1r   c                 ó2  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}| j                  |||«       y rÊ   )rV   r   r“   r”   r•   r–   r—   r˜   r   r™   r‰   r›   s       r   Útest_radianszTestMathLib.test_radiansæ  r  r   c           
      óÀ   — t         }dddddddt        d«      g}t        j                  t        j                  gt        |«      dz  z  }| j                  |||d	d¬
«       y )NrÌ   ç      ð¿ç       €r‘   r  rø   r�   r¢   rØ   ©r{   Úulps)rX   rš   r   r   r™   Úlenr‰   r³   s       r   Útest_erfzTestMathLib.test_erfî  sW   € ÜˆØ˜˜C  s¨C°´E¸%³LÐAˆÜ—=‘=¤%§-¡-Ð0´C¸³MÀQÑ4FÑGˆØ�‰�v˜w¨°xÀaˆÕHr   c           
      óÀ   — t         }dddddddt        d«      g}t        j                  t        j                  gt        |«      dz  z  }| j                  |||d	d
¬«       y )NrÌ   r  r  r‘   r  rø   r�   r¢   rØ   r÷   r  )rZ   rš   r   r   r™   r  r‰   r³   s       r   Ú	test_erfczTestMathLib.test_erfcô  sW   € ÜˆØ˜˜C  s¨C°´E¸%³LÐAˆÜ—=‘=¤%§-¡-Ð0´C¸³MÀQÑ4FÑGˆØ�‰�v˜w¨°xÀaˆÕHr   c                 ó*  — t         }g d¢}t        j                  t        j                  gt	        |«      dz  z  }| j                  |||dd¬«       dddd	d
t        d«      g}t        j                  gt	        |«      z  }| j                  |||dd¬«       y )N)rÌ   çÍÌÌÌÌÌì¿r  r  r¢   rØ   r·   r  çš™™™™™¹¿r¤   ç      @g333333$@g      I@r�   é   )r\   r   r   r™   r  r‰   rš   r³   s       r   Ú
test_gammazTestMathLib.test_gammaú  s‚   € ÜˆÚ(ˆÜ—=‘=¤%§-¡-Ð0´C¸³MÀQÑ4FÑGˆØ�‰�v˜w¨°xÀaˆÔHØ˜#˜s D¨#¬u°U«|Ð<ˆÜ—=‘=�/¤C¨£MÑ1ˆØ�‰�v˜w¨°xÀaˆÕHr   c           
      ó¾   — t         }dddddddt        d«      g}t        j                  t        j                  gt        |«      d	z  z  }| j                  |||d
¬«       y )NrÌ   r#  r$  r¤   g      i@g    _ BgêŒ 9Y>)Fr�   r¢   rØ   r²   )r^   rš   r   r   r™   r  r‰   r³   s       r   Útest_lgammazTestMathLib.test_lgamma  sU   € ÜˆØ˜˜d C¨¨t°T¼5À»<ÐHˆÜ—=‘=¤%§-¡-Ð0´C¸³MÀQÑ4FÑGˆØ�‰�v˜w¨°xˆÕ@r   c                 ób  — t         }t        j                  t        j                  t        j                  t        j
                  t        j                  t        j                  t        j                  t        j                  g}g d¢}|D �cg c]  }|dz  ‘Œ	 }}| j                  ||||«       y c c}w rÓ   )r`   r   r“   r”   r•   r–   r—   r˜   r   r™   rŽ   rÔ   s         r   Útest_powzTestMathLib.test_pow	  sw   € ÜˆÜ—;‘;¤§¡¬U¯[©[Ü—<‘<¤§¡¬u¯|©|Ü—=‘=¤%§-¡-ð1ˆò 1ˆÙ#+Ó,¡8˜a�A˜“E 8ˆÐ,Ø�‰˜ ¨°8Õ<ùò -rÖ   c                 ó  — ddl m}m}m} t        } |t        t        j                  «      g |dd«      ¢­Ž } |t        t        j                  «      g |dd«      ¢­Ž }t         |||«      Ž \  }}}	| j                  ||||	«       y )Nr   )ÚproductÚrepeatÚchain)r    r¡   r   r£   r¢   é   r¿   r¢   )r   r£   r¢   r0  é	   é   )Ú	itertoolsr-  r.  r/  rc   Úsortedr   Úsigned_domainÚunsigned_domainr~   rŽ   )
rt   r-  r.  r/  r€   Úsigned_argsÚunsigned_argsr�   r‚   rŒ   s
             r   Útest_gcdzTestMathLib.test_gcd  s‹   € ß4Ñ4ÜˆÙÜ”5×&Ñ&Ó'ð
Ù*0Ð1IÈ1Ó*Mò
ˆñ  Ü”5×(Ñ(Ó)ð
Ù,2Ð3FÈÓ,Jò
ˆô '*©5°¸mÓ+LÐ&MÑ#ˆ�˜8Ø�‰˜ ¨°8Õ<r   c                 ó  — t         }t        j                  t        j                  g}ddddddt	        d«      t	        d«      t	        d	«      g	}t        t        t        j                  |||«      Ž «      \  }}}| j                  ||||«       y )
Nr    r¡   r  r‘   r£   r¢   ú-infr�   r’   )
re   r   r   r™   rš   Úlistr~   r3  r-  rŽ   )rt   r€   Úvalue_typesÚvaluesr�   r‚   rŒ   s          r   Útest_copysignzTestMathLib.test_copysign  s|   € ÜˆÜ—}‘}¤e§m¡mÐ4ˆØ�b˜$  Q¨¬5°«=¼%À»,Ü˜“,ð ˆä&*¬3Ü×Ñ˜{¨F°FÓ;ð,=ó '>Ñ#ˆ�˜8à�‰˜ ¨°8Õ<r   c           	      óÂ   — t         }t        j                  t        j                  g}ddddt	        d«      t	        d«      t	        d«      g}| j                  |||d¬	«       y )
Ng      Àr  r‘   g      @r;  r�   r’   Úexactr²   )rg   r   r   r™   rš   r‰   r›   s       r   Ú
test_frexpzTestMathLib.test_frexp'  sP   € ÜˆÜ—=‘=¤%§-¡-Ð0ˆØ˜$  SÜ˜&“M¤5¨£<´°u³ð?ˆà�‰�v˜w¨°wˆÕ?r   c                 ó  — t         }t        |«      }t        j                  t        j                  fD ]P  }ddddddt        d«      dft        d	«      dft        d
«      dff	D ]  }d|›�}| j                   ||Ž  ||Ž «       Œ! ŒR y )N)r%  r    )r%  r£   )r‘   r   )r‘   r£   )r  r   )r  r£   r�   r   r;  r’   ry   )ri   r   r   r   r™   rš   rr   )rt   r€   ru   r	  Úargsr|   s         r   Ú
test_ldexpzTestMathLib.test_ldexp.  s†   € ÜˆÜ�V“ˆÜ—m‘m¤U§]¡]Ó3ˆEØ" H¨h¸Ø" IÜ ›,¨Ð*¬U°6«]¸AÐ,>Ü ›,¨Ð*ó,‘ñ )-Ð.�Ø×'Ñ'©¨t¨±f¸d°mÕDñ,ñ 4r   N)rA  )6Ú__name__Ú
__module__Ú__qualname__rv   r‰   rŽ   rœ   r¦   ÚunittestÚskipIfÚsysÚplatformrª   r¬   r¯   r´   r¶   Ú
skipUnlessr   rº   r¼   rÁ   rÃ   rÆ   rÈ   rÍ   rÏ   rÑ   rÕ   rÙ   rÛ   rÞ   rà   râ   rä   rè   rë   rí   rð   ró   rõ   r  r  r  r  r  r!  r'  r)  r+  r9  r?  rB  rE  rm   r   r   rp   rp   ³   s;  „ ò:ó.óNò2ò2ð €X‡_�_�S—\‘\ WÑ,Ø>ó@ñ2ó@ð2ò2ò2ò	2ò2ð €X×Ñ˜ gÑ-Ð/CÓDñ2ó Eð2ò2ò2ò2ò2ò2ò2ò2ò2ò=òAò2òAò2ò2ò2ò2ò2ò2ò)ò)ò,ò?ò:=ò&2ò2òIòIòIòAò=ò
=ò=ò@ó	Er   rp   Ú__main__)=r3  r
   rK  rI  r  Únumpyr1   Únumbar   r   Únumba.tests.supportr   Únumba.npr   Únumba.core.utilsr   r   r   r   r   r   r   r   r   r!   r#   r'   r*   r,   r/   r2   r4   r6   r8   r:   r<   r>   r@   rB   rD   rF   rH   rJ   rL   rN   rQ   rS   rV   rX   rZ   r\   r^   r`   rc   re   rg   ri   rn   rp   rF  Úmainrm   r   r   Ú<module>rU     s   ðÛ Û Û 
Û Û ã ç Ý (Ý "Ý &òòòòòòòòòòòòòòòòòòòòòòòòòòòòòò òòòòòòòòòòòòôDE�(ô DEðN ˆzÒØ€H‡M�M…Oð r   