E.V.E
v2022.03.00

◆ epso_2

eve::epso_2 = {}
inlineconstexpr

Callable object computing the half of the machine epsilon.

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
T epso_2(as<T> x) noexcept;
}
constexpr callable_epso_2_ epso_2
Callable object computing the half of the machine epsilon.
Definition: epso_2.hpp:49
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::epso_2(as<T>()) returns the half of the machine epsilon.

Example

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