These functions allows performing trigonometric computations
All trigonometric functions exists in three flavors for parameters being radian, degrees or \(\pi\) multiples.
The main avantage of using eve::cospi(x)
instead of eve::cos(eve::pi(as(x)* x))
(as well as the other pi ended functions) is that if x
is exactly representable the multiplication by the floating \(\pi\) multiplier is not.
For example eve::cos(eve::pio_2(as<double>()))) is 6.1232e-17 (as pio_2 is not exact), but eve::cospi(0.5) is 0 (as 0.5 is exact).
Moreover each function can be decorated with eve::quarter_circle, eve:half_circle, eve::full_circle.
Variables | |
constexpr auto | eve::arg = functor<arg_t> |
elementwise_callable object computing the phase angle (in radians). | |
constexpr auto | eve::cos = functor<cos_t> |
elementwise_callable object computing the cosine. | |
constexpr auto | eve::cosd = functor<cosd_t> |
elementwise_callable object object computing cosine from an input in degrees. | |
constexpr auto | eve::cospi = functor<cospi_t> |
elementwise_callable object computing the cosine from an input in \(\pi\) multiples. | |
constexpr auto | eve::cot = functor<cot_t> |
elementwise_callable object computing the cotangent of the input. | |
constexpr auto | eve::cotd = functor<cotd_t> |
elementwise_callable object computing the cotangent from an input in degrees. | |
constexpr auto | eve::cotpi = functor<cotpi_t> |
elementwise_callable object computing the cotangent from an input in \(\pi\) multiples. | |
constexpr auto | eve::csc = functor<csc_t> |
elementwise_callable object computing the cosecant of the input. | |
constexpr auto | eve::cscd = functor<cscd_t> |
elementwise_callable object computing the cosecant from an input in degree. | |
constexpr auto | eve::cscpi = functor<cscpi_t> |
elementwise_callable object computing the cosecant in \(\pi\) multiples. | |
constexpr auto | eve::deginrad = functor<deginrad_t> |
elementwise_callable object computing the product of the input by \(\pi/180\). | |
constexpr auto | eve::div_180 = functor<div_180_t> |
elementwise_callable object computing the product of the input by \(1/180\). | |
constexpr auto | eve::quadrant = functor<quadrant_t> |
Callable object computing the quadrant value. | |
constexpr auto | eve::radindeg = functor<radindeg_t> |
elementwise_callable object multiplying the input by \(180/\pi\). | |
constexpr auto | eve::radinpi = functor<radinpi_t> |
elementwise_callable object multiplying the input by \(1/\pi\). | |
constexpr auto | eve::rempio2 = functor<rempio2_t> |
elementwise_callable object computing the remainder of the division by \(\pi/2\). | |
constexpr auto | eve::sec = functor<sec_t> |
elementwise_callable object computing the secant of the input. | |
constexpr auto | eve::secd = functor<secd_t> |
elementwise_callable object computing the secant from an input in degree. | |
constexpr auto | eve::secpi = functor<secpi_t> |
elementwise_callable object computing secant from an input in \(\pi\) multiples. | |
constexpr auto | eve::sin = functor<sin_t> |
elementwise_callable object computing the sine. | |
constexpr auto | eve::sinc = functor<sinc_t> |
elementwise_callable object computing the sine cardinal. | |
constexpr auto | eve::sincos = functor<sincos_t> |
elementwise_callable object computing the simultaneous computation of sine an cosine. | |
constexpr auto | eve::sind = functor<sind_t> |
elementwise_callable object computing the sine from an input in degrees. | |
constexpr auto | eve::sindcosd = functor<sindcosd_t> |
elementwise_callable object computing the simultaneous computation of sine an cosine from an argument in degrees. | |
constexpr auto | eve::sinpi = functor<sinpi_t> |
elementwise_callable object computing the sine from an input in \(\pi\) multiples. | |
constexpr auto | eve::sinpic = functor<sinpic_t> |
elementwise_callable object computing the normalized cardinal sine. | |
constexpr auto | eve::sinpicospi = functor<sinpicospi_t> |
elementwise_callable object computing the simultaneous computation of sin an cos from an argument in \(\pi\) multiples. | |
constexpr auto | eve::tan = functor<tan_t> |
elementwise_callable object computing the tangent. | |
constexpr auto | eve::tand = functor<tand_t> |
elementwise_callable object computing the tangent from an input in degrees. | |
constexpr auto | eve::tanpi = functor<tanpi_t> |
elementwise_callable object computing the tangent from an input in \(\pi\) multiples. | |