These functions allows performing trigonometric computations
All trigonometric functions admits three flavors for parameters being radian, degrees or \(\pi\) multiples.
The main advantage 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::tan = functor<tan_t> |
| elementwise_callable object computing the tangent. | |
|
inlineconstexpr |
elementwise_callable object computing the phase angle (in radians).
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the cosine.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the cotangent of the input.
Parameters
Return value
These are optimized calls providing a balance between speed and range limitation.
In particular:
|
inlineconstexpr |
elementwise_callable object computing the cosecant of the input.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the product of the input by \(\pi/180\).
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the product of the input by \(1/180\).
Parameters
Return value
|
inlineconstexpr |
Callable object computing the quadrant value.
Parameters
n: value. Must be of integral type or a flint
Return value
return a value of the same type as n containing the quadrant number where n (supposed an integer) lies.
|
inlineconstexpr |
elementwise_callable object multiplying the input by \(180/\pi\).
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object multiplying the input by \(1/\pi\).
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the remainder of the division by \(\pi/2\).
Parameters
Return value
These options enable faster computations by assuming that the input satisfies the following respective condition:
For each option, if the respective above condition is not met the result is undefined.
|
inlineconstexpr |
elementwise_callable object computing the secant of the input.
Parameters
* `x`: [floating value](@ref eve::floating_value). * `c`: [Conditional expression](@ref eve::conditional_expr) masking the operation. * `m`: [Logical value](@ref eve::logical_value) masking the operation.
Return value
|
inlineconstexpr |
elementwise_callable object computing the sine.
Parameters
* `x`: [floating value](@ref eve::floating_value). * `c`: [Conditional expression](@ref eve::conditional_expr) masking the operation. * `m`: [Logical value](@ref eve::logical_value) masking the operation.
Return value
These are optimized calls providing a balance between speed and range limitation.
these options can be combined with the previous ones with ranges adapted to the chosen unity.
|
inlineconstexpr |
elementwise_callable object computing the sine cardinal.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the simultaneous computation of sine an cosine.
Parameters
* `x`: [floating value](@ref eve::floating_value). * `c`: [Conditional expression](@ref eve::conditional_expr) masking the operation. * `m`: [Logical value](@ref eve::logical_value) masking the operation.
Return value
|
inlineconstexpr |
elementwise_callable object computing the tangent.
Parameters
* `x`: [floating value](@ref eve::floating_value). * `c`: [Conditional expression](@ref eve::conditional_expr) masking the operation. * `m`: [Logical value](@ref eve::logical_value) masking the operation.
Return value