E.V.E  0.1-beta

◆ maxflint

eve::maxflint = {}
inlineconstexpr

Callable object computing the greatest real n representing an integer and such that n != n+1.

Required header: #include <eve/function/maxflint.hpp>

Member Effect
operator() Computes the maxflint constant

tempate < floating_value T > T operator()( as<T> const & t) const noexcept;
Lightweight type-wrapper.
Definition: as.hpp:29

Parameters

t: Type wrapper instance embedding the type of the constant.

Return value

the call eve::maxflint(as<T>()) is semantically equivalent to

  • T(16777216.0f) if eve::element_type_t<T> is float
  • T(9007199254740992.0) if eve::element_type_t<T> is double

Example

See it live on Compiler Explorer

#include <eve/constant/maxflint.hpp>
#include <eve/wide.hpp>
#include <iostream>
#include <iomanip>
using wide_ft = eve::wide<float>;
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::endl
<< "-> maxflint(as<wide_ft>()) = " << eve::maxflint(eve::as<wide_ft>()) << std::endl
<< "-> maxflint(as(wxf)) = " << eve::maxflint(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> maxflint(as<float>()) = " << std::setprecision(17) << eve::maxflint(eve::as(float())) << std::endl
<< "-> maxflint(as<xf)) = " << std::setprecision(17) << eve::maxflint(eve::as(xf)) << std::endl;
return 0;
}
constexpr callable_maxflint_ maxflint
Callable object computing the greatest real n representing an integer and such that n !...
Definition: maxflint.hpp:57
Wrapper for SIMD registers.
Definition: wide.hpp:65