o
    W۷i.                     @  s  d dl mZ d dlmZ d dlmZ d dlmZ ejZej	ddddd	d
ddddddgeddddddR dddZ
ejZejZejZej	ddddddd d!d"d#d$d%d&ge d'd(d)d*R d+d,dZej	d-dddddd d!d"d#d$d%d&ge d'd(d.d/R d0d1dZdWd3d4Zd5d6 Zd7d8 ZejZejZejZejZejZejZejZej	d9d:d;d<dZej	d=d>d?d@dAdBdCdDdEdFdGdHgedIdJddKdLR dMdNdZej	dOdPgedQdIdRdSR dTdUdZejZdVS )X    )annotations)_core)fusion)	bf16_loopcupy_reciprocalbBhHiIlLqQ)eout0 = 1 / in0r   )code)fr   )dr   )Fout0 = in0_type(1) / in0)Dr   zout0 = in0 == 0 ? 0 : (1 / in0)zPComputes ``1 / x`` elementwise.

    .. seealso:: :data:`numpy.reciprocal`

    )doc	cupy_realz?->?zb->bzB->Bzh->hzH->Hzi->izI->Izl->lzL->Lzq->qzQ->Qze->ezf->fzd->d)F->fout0 = in0.real())D->dr   z
out0 = in0^Returns the real part of the elements of the array.

    .. seealso:: :func:`numpy.real`

    	cupy_imag)r   out0 = in0.imag())r   r    zout0 = 0cReturns the imaginary part of the elements of the array.

    .. seealso:: :func:`numpy.imag`

    Fc                 C  s   |rt | S t | S )zVReturns the angle of the complex argument.

    .. seealso:: :func:`numpy.angle`

    )r   	angle_degangle)zdeg r&   K/home/ubuntu/vllm_env/lib/python3.10/site-packages/cupy/_math/arithmetic.pyr#   E   s   

r#   c                 C  0   t  r
t t| S t| tjst| } | jS )r   )	r   
_is_fusing_call_ufunc_real_ufunc
isinstancer   ndarrayarrayrealvalr&   r&   r'   r/   P   
   
r/   c                 C  r(   )r!   )	r   r)   r*   _imag_ufuncr,   r   r-   r.   imagr0   r&   r&   r'   r4   ]   r2   r4   cupy_float_power)dd->dzFF->D)zDD->Dz6out0 = in1 == in1_type(0) ? in1_type(1): pow(in0, in1)zout0 = pow(in0, in1)zxFirst array elements raised to powers from second array, element-wise.

    .. seealso:: :data:`numpy.float_power`

    	cupy_fmodzbb->bzBB->Bzhh->hzHH->Hzii->izII->Izll->lzLL->Lzqq->qzQQ->Q)zee->eout0 = fmodf(in0, in1)   r8   )zff->fr8   )r6   zout0 = fmod(in0, in1)z4out0 = in1 == 0 ? 0 : fmod((double)in0, (double)in1)z\Computes the remainder of C division elementwise.

    .. seealso:: :data:`numpy.fmod`

    	cupy_modfze->ee   zf->ff)zd->ddz1double iptr; out0 = modf(in0, &iptr); out1 = iptrz1float iptr; out0 = modff(in0, &iptr); out1 = iptrzExtracts the fractional and integral parts of an array elementwise.

    This ufunc returns two arrays.

    .. seealso:: :data:`numpy.modf`

    N)F)
__future__r   cupyr   
cupy._corer   
cupy._utilr   addcreate_ufunc
reciprocalpositivenegative	conjugater+   r3   r#   r/   r4   multiplydividedivmodpowersubtracttrue_dividefloor_dividefloat_powerfmodmodf	remainderr&   r&   r&   r'   <module>   s    


