◆ sindcosd
Callable object computing the simultaneous computation of sin an cos of an argument in degrees. 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/sindcosd.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <iostream>
using wide_ft = eve::wide<double, eve::fixed<4>>;
int main()
{
wide_ft pf = {1.0f, 0.0f, eve::inf(eve::as<float>()), 180.0f};
auto [s, c] = eve::sindcosd(pf);
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> sindcosd(pf) = [" << '\n'
<< " " << s << ", \n"
<< " " << c << '\n'
<< " ]\n";
float xf = 2.3;
auto [ss, sc] = eve::sindcosd(xf);
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> sindcosd(xf) = [" << ss << ", " << sc << "]\n";
return 0;
}
constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 constexpr callable_sindcosd_ sindcosd Callable object computing the simultaneous computation of sin an cos of an argument in degrees. Definition: sindcosd.hpp:61 |