Trigonometric functions¶
-
template<class
B>
batch_type_t<B>xsimd::sin(const simd_base<B> &x)¶ Computes the sine of the batch
x.- Return
the sine of
x.- Parameters
x: batch of floating point values.
-
template<class
B>
batch_type_t<B>xsimd::cos(const simd_base<B> &x)¶ Computes the cosine of the batch
x.- Return
the cosine of
x.- Parameters
x: batch of floating point values.
-
template<class
B>
voidxsimd::sincos(const simd_base<B> &x, batch_type_t<B> &si, batch_type_t<B> &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
B>
batch_type_t<B>xsimd::tan(const simd_base<B> &x)¶ Computes the tangent of the batch
x.- Return
the tangent of
x.- Parameters
x: batch of floating point values.
-
template<class
B>
batch_type_t<B>xsimd::asin(const simd_base<B> &x)¶ Computes the arc sine of the batch
x.- Return
the arc sine of
x.- Parameters
x: batch of floating point values.
-
template<class
B>
batch_type_t<B>xsimd::acos(const simd_base<B> &x)¶ Computes the arc cosine of the batch
x.- Return
the arc cosine of
x.- Parameters
x: batch of floating point values.
-
template<class
B>
batch_type_t<B>xsimd::atan(const simd_base<B> &x)¶ Computes the arc tangent of the batch
x.- Return
the arc tangent of
x.- Parameters
x: batch of floating point values.
-
template<class
B>
batch_type_t<B>xsimd::atan2(const simd_base<B> &y, const simd_base<B> &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.