E.V.E  0.1-beta

◆ minlog2denormal

eve::minlog2denormal = {}
inlineconstexpr

Callable object computing the least value for which eve::exp2 returns a non zero result.

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

Member Effect
operator() Computes the minlog2denormal 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::minlog2denormal(as<T>()) is semantically equivalent to:

  • T(-150.0f) if eve::element_type_t<T> is float
  • T(-1075.0) if eve::element_type_t<T> is double

Example

See it live on Compiler Explorer

#include <eve/constant/minlog2denormal.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float>;
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::endl
<< "-> minlog2denormal(as<wide_ft>()) = " << eve::minlog2denormal(eve::as<wide_ft>()) << std::endl
<< "-> minlog2denormal(as(wxf)) = " << eve::minlog2denormal(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> minlog2denormal(as<float>()) = " << eve::minlog2denormal(eve::as(float())) << std::endl
<< "-> minlog2denormal(as<xf)) = " << eve::minlog2denormal(eve::as(xf)) << std::endl;
return 0;
}
constexpr callable_minlog2denormal_ minlog2denormal
Callable object computing the least value for which eve::exp2 returns a non zero result.
Definition: minlog2denormal.hpp:57
Wrapper for SIMD registers.
Definition: wide.hpp:65