
    J/Ph                         d dl Z d dlZd dlmZ d dlmZ d dlZ G d dej                  Z	e
dk    r ej                     dS dS )    N)njit)typesc                       e Zd ZdZd ZdS )
TestMulti3a  
    This test is only relevant for 32-bit architectures.

    Test __multi3 implementation in _helperlib.c.
    The symbol defines a i128 multiplication.
    It is necessary for working around an issue in LLVM (see issue #969).
    The symbol does not exist in 32-bit platform, and should not be used by
    LLVM.  However, optimization passes will create i65 multiplication that
    is then lowered to __multi3.
    c                    t          d          d             }g d}t          d          D ]*}|                    t          j        dd                     +d }|D ]*}|                      ||           ||                     +d S )Nz(int64,)c                 8    d}t          |           D ]}||z  }|S )Nr   )range)xresis      W/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numba/tests/test_multi3.pyfuncz$TestMulti3.test_multi3.<locals>.func   s,    C1XX  qJ    )r               l        l        l   MW	lMW	i  r   r   c                 .    | dk    rdS | | dz
  z  dz  dz  S )Nr   r      l     )r
   s    r   expectedz(TestMulti3.test_multi3.<locals>.expected"   s'    Avvaa!a%[Q&955r   )r   r	   appendrandomrandintassertEqual)selfr   x_cases_r   r
   s         r   test_multi3zTestMulti3.test_multi3   s    	j			 	 
		: : : s 	: 	:ANN6>!Z889999	6 	6 	6  	3 	3AXXa[[$$q''2222	3 	3r   N)__name__
__module____qualname____doc__r!   r   r   r   r   r   	   s-        	 	3 3 3 3 3r   r   __main__)r   numpynpnumbar   
numba.corer   unittestTestCaser   r"   mainr   r   r   <module>r.      s                     3 3 3 3 3" 3 3 3B zHMOOOOO r   