Power functions

template <class T, class A>
batch<T, A> xsimd::pow(batch<T, A> const &x, batch<T, A> const &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, class A>
batch<T, A> xsimd::rsqrt(batch<T, A> const &x)

Computes an estimate of the inverse square root of the batch x.

Warning

Unlike most xsimd function, this does not return the same result as the equivalent scalar operation, trading accuracy for speed.

Return

the inverse square root of x.

Parameters
  • x: batch of floating point values.

template <class T, class A>
batch<T, A> xsimd::sqrt(batch<T, A> const &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, class A>
batch<T, A> xsimd::cbrt(batch<T, A> const &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, class A>
batch<T, A> xsimd::hypot(batch<T, A> const &x, batch<T, A> const &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.