Power functions

template <class T, std::size_t N>
batch<T, N> xsimd::pow(const batch<T, N> &x, const batch<T, N> &y)

Computes the value of the batch x raised to the power y.

Return
x raised to the power y.
Parameters
  • x: batch of floating point values.
  • y: batch of floating point values.

template <class T, std::size_t N>
batch<T, N> xsimd::sqrt(const batch<T, N> &x)

Computes the square root of the batch x.

Return
the square root of x.
Parameters
  • x: batch of floating point values.

template <class T, std::size_t N>
batch<T, N> xsimd::cbrt(const batch<T, N> &x)

Computes the cubic root of the batch x.

Return
the cubic root of x.
Parameters
  • x: batch of floating point values.

template <class T, std::size_t N>
batch<T, N> xsimd::hypot(const batch<T, N> &x, const batch<T, N> &y)

Computes the square root of the sum of the squares of the batches x, and y.

Return
the square root of the sum of the squares of x and y.
Parameters
  • x: batch of floating point values.
  • y: batch of floating point values.