Mathematical functions
======================

.. Hint:: `NumPy API Reference: Mathematical functions <https://numpy.org/doc/stable/reference/routines.math.html>`_

.. currentmodule:: cupy

Trigonometric functions
-----------------------

.. autosummary::
   :toctree: generated/

   sin
   cos
   tan
   arcsin
   arccos
   arctan
   hypot
   arctan2
   degrees
   radians
   unwrap
   deg2rad
   rad2deg


Hyperbolic functions
--------------------

.. autosummary::
   :toctree: generated/

   sinh
   cosh
   tanh
   arcsinh
   arccosh
   arctanh


Rounding
--------

.. autosummary::
   :toctree: generated/

   around
   round_
   rint
   fix
   floor
   ceil
   trunc


Sums, products, differences
---------------------------

.. autosummary::
   :toctree: generated/

   prod
   sum
   nanprod
   nansum
   cumprod
   cumsum
   nancumprod
   nancumsum
   diff
   gradient
   ediff1d
   cross
   trapz


Exponents and logarithms
------------------------

.. autosummary::
   :toctree: generated/

   exp
   expm1
   exp2
   log
   log10
   log2
   log1p
   logaddexp
   logaddexp2


Other special functions
-----------------------

.. autosummary::
   :toctree: generated/

   i0
   sinc


Floating point routines
-----------------------

.. autosummary::
   :toctree: generated/

   signbit
   copysign
   frexp
   ldexp
   nextafter


Rational routines
-----------------

.. autosummary::
   :toctree: generated/

   lcm
   gcd


Arithmetic operations
---------------------

.. autosummary::
   :toctree: generated/

   add
   reciprocal
   positive
   negative
   multiply
   divide
   power
   subtract
   true_divide
   floor_divide
   float_power
   fmod
   mod
   modf
   remainder
   divmod


Handling complex numbers
------------------------

.. autosummary::
   :toctree: generated/

   angle
   real
   imag
   conj
   conjugate


Miscellaneous
-------------

.. autosummary::
   :toctree: generated/

   convolve
   clip
   sqrt
   cbrt
   square
   absolute
   fabs
   sign
   maximum
   minimum
   fmax
   fmin
   nan_to_num
   heaviside
   real_if_close
   interp
