Computes the full nan constant such that all components of the chosen type are NaN.
#include <eve/wide.hpp>
#include <iostream>
#include <kyosu/kyosu.hpp>
int main()
{
using kyosu::as;
std::cout << "Real: \n";
std::cout <<
"fnan = " <<
fnan <<
"\n";
std::cout <<
"1.0f/fnan = " << 1.0 /
fnan << std::endl;
std::cout << "Complex: \n";
std::cout << "c = " << c << std::endl;
std::cout <<
"fnan(as(c)) " <<
" -> " <<
kyosu::fnan(as(c)) <<
"\n";
std::cout << c / 0.0f << std::endl;
std::cout << "Quaternion: \n";
std::cout <<
"fnan(as(z)) " <<
" -> " <<
kyosu::fnan(as(z)) <<
"\n";
std::cout << "SIMD: ";
using wc_t = eve::wide<kyosu::complex_t<double>, eve::fixed<2>>;
std::cout <<
"fnan(as(wz)) " <<
" -> " <<
kyosu::fnan(as(wz)) <<
"\n";
return 0;
}
constexpr auto rec
Computes the inverse of the argument.
Definition rec.hpp:61
constexpr auto abs
Computes the absolute value of the parameter.
Definition abs.hpp:69
constexpr auto arg
argument.
Definition arg.hpp:74
as_cayley_dickson_n_t< 2, T > complex_t
Type alias for complex numbers.
Definition complex.hpp:27
as_cayley_dickson_n_t< 4, T > quaternion_t
Type alias for quaternion numbers.
Definition quaternion.hpp:24