E.V.E
v2023.02.15

◆ logeps

eve::logeps = {}
inlineconstexpr

Computes the natural logarithm of the machine epsilon.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
T logeps(as<T> x) noexcept;
}
constexpr callable_logeps_ logeps
Computes the natural logarithm of the machine epsilon.
Definition: logeps.hpp:58
Definition: abi.hpp:18
Lightweight type-wrapper.
Definition: as.hpp:29

Parameters

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

Return value

The call eve::logeps(as<T>()) is semantically equivalent to eve::log (eve::eps (eve::as<T>())).

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
<< "-> logeps(as<wide_ft>()) = " << eve::logeps(eve::as<wide_ft>()) << std::endl
<< "-> logeps(as(wxf)) = " << eve::logeps(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> logeps(as<float>()) = " << eve::logeps(eve::as(float())) << std::endl
<< "-> logeps(as<xf)) = " << eve::logeps(eve::as(xf)) << std::endl;
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:65