Trigonometric functions

template<class T, class A>
batch<T, A> xsimd::sin(batch<T, A> const &x)

Computes the sine of the batch x.

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

template<class T, class A>
batch<T, A> xsimd::cos(batch<T, A> const &x)

Computes the cosine of the batch x.

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

template<class T, class A>
std::pair<batch<T, A>, batch<T, A>> xsimd::sincos(batch<T, A> const &x)

Computes the sine and the cosine of the batch x.

This method is faster than calling sine and cosine independently.

Return
a pair containing the sine then the cosine of batch x
Parameters
  • x: batch of floating point values.

template<class T, class A>
batch<T, A> xsimd::tan(batch<T, A> const &x)

Computes the tangent of the batch x.

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

template<class T, class A>
batch<T, A> xsimd::asin(batch<T, A> const &x)

Computes the arc sine of the batch x.

Return
the arc sine of x.
Parameters
  • x: batch of floating point values.

template<class T, class A>
batch<T, A> xsimd::acos(batch<T, A> const &x)

Computes the arc cosine of the batch x.

Return
the arc cosine of x.
Parameters
  • x: batch of floating point values.

template<class T, class A>
batch<T, A> xsimd::atan(batch<T, A> const &x)

Computes the arc tangent of the batch x.

Return
the arc tangent of x.
Parameters
  • x: batch of floating point values.

template<class T, class A>
batch<T, A> xsimd::atan2(batch<T, A> const &x, batch<T, A> const &y)

Computes the arc tangent of the batch x/y, using the signs of the arguments to determine the correct quadrant.

Return
the arc tangent of x/y.
Parameters
  • x: batch of floating point values.
  • y: batch of floating point values.