# Mathematical functions

- Operators and related functions

`xt::operator+()` | identity
`xt::operator-()` | opposite
`xt::operator+()` | addition
`xt::operator-()` | substraction
`xt::operator*()` | multiplication
`xt::operator/()` | division
`xt::operator||()` | logical or
`xt::operator&&()` | logical and
`xt::operator!()` | logical not
`xt::where()` | ternary selection
`xt::any()` | return true if any value is truthy
`xt::all()` | return true if all the values are truthy
`xt::operator<()` | element-wise lesser than
`xt::operator<=()` | element-wise less or equal
`xt::operator>()` | element-wise greater than
`xt::operator>=()` | element-wise greater or equal
`xt::operator==()` | expression equality
`xt::operator!=()` | expression inequality
`xt::equal()` | element-wise equality
`xt::not_equal()` | element-wise inequality
`xt::less()` | element-wise lesser than
`xt::less_equal()` | element-wise less or equal
`xt::greater()` | element-wise greater than
`xt::greater_equal()` | element-wise greater or equal
`xt::cast()` | element-wise `static_cast`
`xt::operator&()` | bitwise and
`xt::operator|()` | bitwise or
`xt::operator^()` | bitwise xor
`xt::operator~()` | bitwise not
`xt::left_shift()` | bitwise shift left
`xt::right_shift()` | bitwise shift right
`xt::operator<<()` | bitwise shift left
`xt::operator>>()` | bitwise shift right

- Index related functions
  - `from_indices()`

`xt::where()` | indices selection
`xt::nonzero()` | indices selection
`xt::argwhere()` | indices selection
`xt::from_indices()` | biulder from indices

- Basic functions

`xt::abs()` | absolute value
`xt::fabs()` | absolute value
`xt::fmod()` | remainder of the floating point division operation
`xt::remainder()` | signed remainder of the division operation
`xt::fma()` | fused multiply-add operation
`xt::minimum()` | element-wise minimum
`xt::maximum()` | element-wise maximum
`xt::fmin()` | element-wise minimum for floating point values
`xt::fmax()` | element-wise maximum for floating point values
`xt::fdim()` | element-wise positive difference
`xt::clip()` | element-wise clipping operation
`xt::sign()` | element-wise indication of the sign

- Exponential functions

`xt::exp()` | natural exponential function
`xt::exp2()` | base 2 exponential function
`xt::expm1()` | natural exponential function, minus one
`xt::log()` | natural logarithm function
`xt::log2()` | base 2 logarithm function
`xt::log10()` | base 10 logarithm function
`xt::log1p()` | natural logarithm of one plus function

- Power functions

`xt::pow()` | power function
`xt::sqrt()` | square root function
`xt::cbrt()` | cubic root function
`xt::hypot()` | hypotenuse function

- Trigonometric functions

`xt::sin()` | sine function
`xt::cos()` | cosine function
`xt::tan()` | tangent function
`xt::asin()` | arc sine function
`xt::acos()` | arc cosine function
`xt::atan()` | arc tangent function
`xt::atan2()` | arc tangent function, determining quadrants

- Hyperbolic functions

`xt::sinh()` | hyperbolic sine function
`xt::cosh()` | hyperbolic cosine function
`xt::tanh()` | hyperbolic tangent function
`xt::asinh()` | inverse hyperbolic sine function
`xt::acosh()` | inverse hyperbolic cosine function
`xt::atanh()` | inverse hyperbolic tangent function

- Error and gamma functions

`xt::erf()` | error function
`xt::erfc()` | complementary error function
`xt::tgamma()` | gamma function
`xt::lgamma()` | natural logarithm of the gamma function

- Nearest integer floating point operations

`xt::ceil()` | nearest integers not less
`xt::floor()` | nearest integers not greater
`xt::trunc()` | nearest integers not greater in magnitude
`xt::round()` | nearest integers, rounding away from zero
`xt::nearbyint()` | nearest integers using current rounding mode
`xt::rint()` | nearest integers using current rounding mode

- Classification functions

`xt::isfinite()` | checks for finite values
`xt::isinf()` | checks for infinite values
`xt::isnan()` | checks for NaN values
`xt::isclose()` | element-wise closeness detection
`xt::allclose()` | closeness reduction

- Reducing functions
  - `sum()`
  - `prod()`
  - `mean()`
  - `variance()`
  - `amax()`
  - `amin()`

`xt::sum()` | sum of elements over given axes
`xt::prod()` | product of elements over given axes
`xt::mean()` | mean of elements over given axes
`xt::average()` | weighted average along the specified axis
`xt::variance()` | variance of elements over given axes
`xt::stddev()` | standard deviation of elements over given axes
`xt::diff()` | Calculate the n-th discrete difference along the given axis
`xt::amax()` | amax of elements over given axes
`xt::amin()` | amin of elements over given axes
`xt::trapz()` | Integrate along the given axis using the composite trapezoidal rule
`xt::norm_l0()` | L0 pseudo-norm over given axes
`xt::norm_l1()` | L1 norm over given axes
`xt::norm_sq()` | Squared L2 norm over given axes
`xt::norm_l2()` | L2 norm over given axes
`xt::norm_linf()` | Infinity norm over given axes
`xt::norm_lp_to_p()` | p_th power of Lp norm over given axes
`xt::norm_lp()` | Lp norm over given axes
`xt::norm_induced_l1()` | Induced L1 norm of a matrix
`xt::norm_induced_linf()` | Induced L-infinity norm of a matrix

- Accumulating functions
  - `cumsum()`
  - `cumprod()`

`xt::cumsum()` | Cumulative sum of elements over a given axis
`xt::cumprod()` | Cumulative product of elements over given axes

- NaN functions
  - `nancumsum()`
  - `nancumprod()`

`xt::nan_to_num()` | Convert NaN and +/- inf to finite numbers
`xt::nanmin()` | Min of elements over a given axis, ignoring NaNs
`xt::nanmax()` | Max of elements over a given axis, ignoring NaNs
`xt::nansum()` | Sum of elements over a given axis, replacing NaN with 0
`xt::nanprod()` | Product of elements over given axes, replacing NaN with 1
`xt::nancumsum()` | Cumulative sum of elements over a given axis, replacing NaN with 0
`xt::nancumprod()` | Cumulative product of elements over given axes, replacing NaN with 1
`xt::nanmean()` | Mean of elements over given axes, ignoring NaNs
`xt::nanvar()` | Variance of elements over given axes, ignoring NaNs
`xt::nanstd()` | Standard deviation of elements over given axes, ignoring NaNs