E.V.E  0.1-beta
Trigonometric

Detailed Description

These functions provide scalar and SIMD version of trigonometric functions.

Moreover all trigonometric direct functions (except sinc and sinpic) provide 3 decorators flavours :

The possible decorators are:

  • quarter_circle: the fastest but gives the correct result in \([-\pi/4, +\pi/4]\) only and Nan outside.
  • half_circle: gives the correct result for \([-\pi/2, +\pi/2]\) only and Nan outside.
  • full_circle: gives the correct result for \([-\pi, +\pi]\) only and Nan outside.

    Without any decorator the call tests the input value to choose among the decorated ones the best fit. Of course, with SIMD parameter the fit is the interval containing all the vector elements.

    The rationale to provide these flavours is that the more costly part of the computation of a trigonometric function from the radian angle is the reduction of the argument modulo \(\pi/4\) that, to be correct in the full range must use a few hundreds of \(\pi\) decimals:

  • if \(x \in [-\pi/4, +\pi/4]\) there is no reduction to perform.
  • if \(x \in [-\pi/2, +\pi/2]\) or \([-\pi, +\pi]\) the work is not a lot heavier.
  • for the whole range a quite heavy algorithm is to be used. However, internally an aleviated algorithm is used if the inputs are all less than 1.76858e+15f for floats and 2.0e14 for doubles.

Convenience header:

#include <eve/function/trigonometric.hpp>

Variables

constexpr callable_cos_ eve::cos = {}
 Callable object computing cos. More...
 
constexpr callable_cosd_ eve::cosd = {}
 Callable object computing cosd. More...
 
constexpr callable_cospi_ eve::cospi = {}
 Callable object computing cospi. More...
 
constexpr callable_cot_ eve::cot = {}
 Callable object computing cot. More...
 
constexpr callable_cotd_ eve::cotd = {}
 Callable object computing cotd. More...
 
constexpr callable_cotpi_ eve::cotpi = {}
 Callable object computing cotpi. More...
 
constexpr callable_csc_ eve::csc = {}
 Callable object computing csc. More...
 
constexpr callable_cscpi_ eve::cscpi = {}
 Callable object computing cscpi. More...
 
constexpr callable_quadrant_ eve::quadrant = {}
 Callable object computing the quadrant value. More...
 
constexpr callable_rempio2_ eve::rempio2 = {}
 Callable object computing the rempio2 value. More...
 
constexpr callable_sec_ eve::sec = {}
 Callable object computing sec. More...
 
constexpr callable_secpi_ eve::secpi = {}
 Callable object computing secpi. More...
 
constexpr callable_sin_ eve::sin = {}
 Callable object computing sin. More...
 
constexpr callable_sinc_ eve::sinc = {}
 Callable object computing the sine cardinal. More...
 
constexpr callable_sincos_ eve::sincos = {}
 Callable object computing the simultaneous computation of sin an cos. More...
 
constexpr callable_sind_ eve::sind = {}
 Callable object computing sind. More...
 
constexpr callable_sindcosd_ eve::sindcosd = {}
 Callable object computing the simultaneous computation of sin an cos of an argument in degrees. More...
 
constexpr callable_sinpi_ eve::sinpi = {}
 Callable object computing sinpi. More...
 
constexpr callable_sinpic_ eve::sinpic = {}
 Callable object computing sinpic. More...
 
constexpr callable_sinpicospi_ eve::sinpicospi = {}
 Callable object computing the simultaneous computation of sin an cos of an argument in . More...
 
constexpr callable_tan_ eve::tan = {}
 Callable object computing tan. More...
 
constexpr callable_tanpi_ eve::tanpi = {}
 Callable object computing tanpi. More...
 
constexpr quarter_circle_type const eve::quarter_circle = {}
 Higher-order Callable Object imbuing a limited range semantic onto other Callable Objects. More...
 
constexpr half_circle_type const eve::half_circle = {}
 Higher-order Callable Object imbuing a limited range standard semantic onto other Callable Objects. More...