Trigonometric functionsΒΆ

template <class T, std::size_t N>
batch<T, N> xsimd::sin(const batch<T, N> &x)

Computes the sine of the batch x.

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

template <class T, std::size_t N>
batch<T, N> xsimd::cos(const batch<T, N> &x)

Computes the cosine of the batch x.

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

template <class T, std::size_t N>
void xsimd::sincos(const batch<T, N> &x, batch<T, N> &si, batch<T, N> &co)

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.
  • si: the sine of x.
  • co: the cosine of x.

template <class T, std::size_t N>
batch<T, N> xsimd::tan(const batch<T, N> &x)

Computes the tangent of the batch x.

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

template <class T, std::size_t N>
batch<T, N> xsimd::asin(const batch<T, N> &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, std::size_t N>
batch<T, N> xsimd::acos(const batch<T, N> &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, std::size_t N>
batch<T, N> xsimd::atan(const batch<T, N> &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, std::size_t N>
batch<T, N> xsimd::atan2(const batch<T, N> &y, const batch<T, N> &x)

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.