Trigonometric functions¶
-
template<class T, class A>
inline batch<T, A> xsimd::sin(batch<T, A> const &x) noexcept¶ Computes the sine of the batch
x
.- Parameters:
x – batch of floating point values.
- Returns:
the sine of
x
.
-
template<class T, class A>
inline batch<T, A> xsimd::cos(batch<T, A> const &x) noexcept¶ Computes the cosine of the batch
x
.- Parameters:
x – batch of floating point values.
- Returns:
the cosine of
x
.
-
template<class T, class A>
inline std::pair<batch<T, A>, batch<T, A>> xsimd::sincos(batch<T, A> const &x) noexcept¶ Computes the sine and the cosine of the batch
x
.This method is faster than calling sine and cosine independently.
- Parameters:
x – batch of floating point values.
- Returns:
a pair containing the sine then the cosine of batch
x
-
template<class T, class A>
inline batch<T, A> xsimd::tan(batch<T, A> const &x) noexcept¶ Computes the tangent of the batch
x
.- Parameters:
x – batch of floating point values.
- Returns:
the tangent of
x
.
-
template<class T, class A>
inline batch<T, A> xsimd::asin(batch<T, A> const &x) noexcept¶ Computes the arc sine of the batch
x
.- Parameters:
x – batch of floating point values.
- Returns:
the arc sine of
x
.
-
template<class T, class A>
inline batch<T, A> xsimd::acos(batch<T, A> const &x) noexcept¶ Computes the arc cosine of the batch
x
.- Parameters:
x – batch of floating point values.
- Returns:
the arc cosine of
x
.
-
template<class T, class A>
inline batch<T, A> xsimd::atan(batch<T, A> const &x) noexcept¶ Computes the arc tangent of the batch
x
.- Parameters:
x – batch of floating point values.
- Returns:
the arc tangent of
x
.
-
template<class T, class A>
inline batch<T, A> xsimd::atan2(batch<T, A> const &x, batch<T, A> const &y) noexcept¶ Computes the arc tangent of the batch
x/y
, using the signs of the arguments to determine the correct quadrant.- Parameters:
x – batch of floating point values.
y – batch of floating point values.
- Returns:
the arc tangent of
x/y
.