Power functions

template<class B>
inline batch_type_t<B> xsimd::pow(const simd_base<B> &x, const simd_base<B> &y)

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

Parameters
  • x – batch of floating point values.

  • y – batch of floating point values.

Returns

x raised to the power y.

template<class X>
inline batch_type_t<X> xsimd::sqrt(const simd_base<X> &rhs)

Computes the square root of the batch rhs.

Parameters

rhs – batch of floating point values.

Returns

the square root of rhs.

template<class B>
inline batch_type_t<B> xsimd::cbrt(const simd_base<B> &x)

Computes the cubic root of the batch x.

Parameters

x – batch of floating point values.

Returns

the cubic root of x.

template<class B>
inline batch_type_t<B> xsimd::hypot(const simd_base<B> &x, const simd_base<B> &y)

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

Parameters
  • x – batch of floating point values.

  • y – batch of floating point values.

Returns

the square root of the sum of the squares of x and y.