# Mathematical Functions¶

## Trigonometric functions¶

 cupy.sin Elementwise sine function. cupy.cos Elementwise cosine function. cupy.tan Elementwise tangent function. cupy.arcsin Elementwise inverse-sine function (a.k.a. cupy.arccos Elementwise inverse-cosine function (a.k.a. cupy.arctan Elementwise inverse-tangent function (a.k.a. cupy.hypot Computes the hypoteneous of orthogonal vectors of given length. cupy.arctan2 Elementwise inverse-tangent of the ratio of two arrays. cupy.deg2rad Converts angles from degrees to radians elementwise. cupy.rad2deg Converts angles from radians to degrees elementwise. cupy.degrees Converts angles from radians to degrees elementwise. cupy.radians Converts angles from degrees to radians elementwise.

## Hyperbolic functions¶

 cupy.sinh Elementwise hyperbolic sine function. cupy.cosh Elementwise hyperbolic cosine function. cupy.tanh Elementwise hyperbolic tangent function. cupy.arcsinh Elementwise inverse of hyperbolic sine function. cupy.arccosh Elementwise inverse of hyperbolic cosine function. cupy.arctanh Elementwise inverse of hyperbolic tangent function.

## Rounding¶

 cupy.rint Rounds each element of an array to the nearest integer. cupy.floor Rounds each element of an array to its floor integer. cupy.ceil Rounds each element of an array to its ceiling integer. cupy.trunc Rounds each element of an array towards zero. cupy.fix If given value x is positive, it return floor(x).

## Sums and products¶

 cupy.sum Returns the sum of an array along given axes. cupy.prod Returns the product of an array along given axes. cupy.cumsum Returns the cumulative sum of an array along a given axis. cupy.cumprod Returns the cumulative product of an array along a given axis.

## Exponential and logarithm functions¶

 cupy.exp Elementwise exponential function. cupy.expm1 Computes exp(x) - 1 elementwise. cupy.exp2 Elementwise exponentiation with base 2. cupy.log Elementwise natural logarithm function. cupy.log10 Elementwise common logarithm function. cupy.log2 Elementwise binary logarithm function. cupy.log1p Computes log(1 + x) elementwise. cupy.logaddexp Computes log(exp(x1) + exp(x2)) elementwise. cupy.logaddexp2 Computes log2(exp2(x1) + exp2(x2)) elementwise.

## Floating point manipulations¶

 cupy.signbit Tests elementwise if the sign bit is set (i.e. cupy.copysign Returns the first argument with the sign bit of the second elementwise. cupy.ldexp Computes x1 * 2 ** x2 elementwise. cupy.frexp Decomposes each element to mantissa and two’s exponent. cupy.nextafter Computes the nearest neighbor float values towards the second argument.

## Arithmetic operations¶

 cupy.negative Takes numerical negative elementwise. cupy.add Adds two arrays elementwise. cupy.subtract Subtracts arguments elementwise. cupy.multiply Multiplies two arrays elementwise. cupy.divide Elementwise true division (i.e. cupy.true_divide Elementwise true division (i.e. cupy.floor_divide Elementwise floor division (i.e. cupy.power Computes x1 ** x2 elementwise. cupy.fmod Computes the remainder of C division elementwise. cupy.mod Computes the remainder of Python division elementwise. cupy.remainder Computes the remainder of Python division elementwise. cupy.modf Extracts the fractional and integral parts of an array elementwise. cupy.reciprocal Computes 1 / x elementwise.

## Miscellaneous¶

 cupy.clip Clips the values of an array to a given interval. cupy.sqrt cupy.square Elementwise square function. cupy.absolute Elementwise absolute value function. cupy.sign Elementwise sign function. cupy.maximum Takes the maximum of two arrays elementwise. cupy.minimum Takes the minimum of two arrays elementwise. cupy.fmax Takes the maximum of two arrays elementwise. cupy.fmin Takes the minimum of two arrays elementwise. cupy.blackman Returns the Blackman window. cupy.hamming Returns the Hamming window. cupy.hanning Returns the Hanning window.