E.V.E
v2022.09.01

◆ sindcosd

eve::sindcosd = {}
inlineconstexpr

Callable object computing the simultaneous computation of sine an cosine from an argument in degrees.

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
kumi::tuple<T, T> sindcosd(T x) noexcept;
}
constexpr callable_sindcosd_ sindcosd
Callable object computing the simultaneous computation of sine an cosine from an argument in degrees.
Definition: sindcosd.hpp:66
Definition: all_of.hpp:22

Parameters

x: floating real value.

Return value

The computation returns a pair and is semantically equivalent to {sind(x), cosd(x)}

Example

#include <eve/module/math.hpp>
#include <eve/wide.hpp>
#include <iostream>
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
Computes the infinity ieee value.
Definition: inf.hpp:58
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65

Semantic Modifiers