Computes the complex-infinite defined as \(\textrm{NaN} + i\, \textrm{inf}\) in the chosen type.
#include <kyosu/kyosu.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
using kyosu::as;
std::cout << "Real: \n";
std::cout <<
"cinf = " <<
cinf <<
"\n";
std::cout <<
"1.0f/cinf = " << 1.0/
cinf << std::endl;
std::cout << "Complex: \n";
std::cout << "c = " << c << std::endl;
std::cout <<
"cinf(as(c)) " <<
" -> " <<
kyosu::cinf(as(c)) <<
"\n";
std::cout << c/0.0f << std::endl;
std::cout << "Quaternion: \n";
std::cout <<
"cinf(as(z)) " <<
" -> " <<
kyosu::cinf(as(z)) <<
"\n";
std::cout << "SIMD: ";
using wc_t = eve::wide<kyosu::complex_t<double>, eve::fixed<2>>;
std::cout <<
"cinf(as(wz)) " <<
" -> " <<
kyosu::cinf(as(wz)) <<
"\n";
return 0;
}
constexpr auto rec
Computes the inverse of the argument.
Definition: rec.hpp:67
constexpr auto arg
argument.
Definition: arg.hpp:70
constexpr auto abs
Computes the absolute value of the parameter.
Definition: abs.hpp:78
as_cayley_dickson_n_t< 4, T > quaternion_t
Type alias for quaternion numbers.
Definition: quaternion.hpp:24
as_cayley_dickson_n_t< 2, T > complex_t
Type alias for complex numbers.
Definition: complex.hpp:27