These functions allows performing trigonometric computations
All trigonometric functions admits three flavors for parameters being radian, degrees or \(\pi\) multiples.
The main avantage of using eve::cos[eve::radpi](x) instead of eve::cos(eve::pi(as(x)* x)) (as well as the other radpi decorated 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::cosradpi 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::cot = functor<cot_t> |
| elementwise_callable object computing the cotangent of the input. | |
| constexpr auto | eve::csc = functor<csc_t> |
| elementwise_callable object computing the cosecant of the input. | |
| 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::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::sinpic = functor<sinpic_t> |
| elementwise_callable object computing the normalized cardinal sine. | |
| constexpr auto | eve::tan = functor<tan_t> |
| elementwise_callable object computing the tangent. | |