Power functions¶
-
template<class T, class A>
inline batch<T, A> xsimd::pow(batch<T, A> const &x, batch<T, A> const &y) noexcept¶ Computes the value of the batch
x
raised to the powery
.- Parameters
x – batch of floating point values.
y – batch of floating point values.
- Returns
x
raised to the powery
.
-
template<class T, class A>
inline batch<T, A> xsimd::rsqrt(batch<T, A> const &x) noexcept¶ 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.
- Parameters
x – batch of floating point values.
- Returns
the inverse square root of
x
.
-
template<class T, class A>
inline batch<T, A> xsimd::sqrt(batch<T, A> const &x) noexcept¶ Computes the square root of the batch
x
.- Parameters
x – batch of floating point values.
- Returns
the square root of
x
.
-
template<class T, class A>
inline batch<T, A> xsimd::cbrt(batch<T, A> const &x) noexcept¶ Computes the cubic root of the batch
x
.- Parameters
x – batch of floating point values.
- Returns
the cubic root of
x
.
-
template<class T, class A>
inline batch<T, A> xsimd::hypot(batch<T, A> const &x, batch<T, A> const &y) noexcept¶ Computes the square root of the sum of the squares of the batches
x
, andy
.- 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
andy
.