E.V.E  0.1-beta

◆ oneosqrteps

eve::oneosqrteps = {}
inlineconstexpr

Callable object computing the inverse of the square root of the machine epsilon.

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

Member Effect
operator() Computes the oneosqrteps 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::oneosqrteps(as<T>()) is semantically equivalent to eve::rec(eve::sqrt(eve::eps(as<T>())))


Example

See it live on Compiler Explorer

#include <eve/constant/oneosqrteps.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float>;
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::endl
<< "-> oneosqrteps(as<wide_ft>()) = " << eve::oneosqrteps(eve::as<wide_ft>()) << std::endl
<< "-> oneosqrteps(as(wxf)) = " << eve::oneosqrteps(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> oneosqrteps(as<float>()) = " << eve::oneosqrteps(eve::as(float())) << std::endl
<< "-> oneosqrteps(as<xf)) = " << eve::oneosqrteps(eve::as(xf)) << std::endl;
return 0;
}
constexpr callable_oneosqrteps_ oneosqrteps
Callable object computing the inverse of the square root of the machine epsilon.
Definition: oneosqrteps.hpp:55
Wrapper for SIMD registers.
Definition: wide.hpp:65