◆ sincos
Callable object computing the simultaneous computation of sin an cos. Required header: Members Functions
Definition: value.hpp:83 Parameters Return value The computation returns a pair and is semantically equivalent to Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/sincos.hpp>
#include <eve/wide.hpp>
#include <eve/constant/pi.hpp>
#include <eve/constant/inf.hpp>
#include <iostream>
using wide_ft = eve::wide<double, eve::fixed<4>>;
int main()
{
auto [s, c] = eve::sincos(pf);
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> sincos(pf) = [" << '\n'
<< " " << s << ", \n"
<< " " << c << '\n'
<< " ]\n";
float xf = 2.3;
auto [ss, sc] = eve::sincos(xf);
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> sincos(xf) = [" << ss << ", " << sc << "]\n";
return 0;
}
constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 constexpr callable_sincos_ sincos Callable object computing the simultaneous computation of sin an cos. Definition: sincos.hpp:61 |