E.V.E
v2022.09.01

◆ mindenormal

eve::mindenormal = {}
inlineconstexpr

Computes the smallest denormal positive value.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T mindenormal(as<T> x) noexcept;
}
constexpr callable_mindenormal_ mindenormal
Computes the smallest denormal positive value.
Definition: mindenormal.hpp:59
Definition: all_of.hpp:22
Lightweight type-wrapper.
Definition: as.hpp:29

Parameters

  • x : Type wrapper instance embedding the type of the constant.

Return value

The call eve::mindenormal(as<T>()) is semantically equivalent to:

  • T(1.4013e-45f) if eve::element_type_t<T> is float
  • T(4.94066e-324) if eve::element_type_t<T> is double

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float>;
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::endl
<< "-> mindenormal(as<wide_ft>()) = " << eve::mindenormal(eve::as<wide_ft>()) << std::endl
<< "-> mindenormal(as(wxf)) = " << eve::mindenormal(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> mindenormal(as<float>()) = " << eve::mindenormal(eve::as(float())) << std::endl
<< "-> mindenormal(as<xf)) = " << eve::mindenormal(eve::as(xf)) << std::endl;
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65