E.V.E  0.1-beta

◆ invlog_10

eve::invlog_10 = {}
inlineconstexpr

Callable object computing 1/log(10).

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

Member Effect
operator() Computes the invlog_10 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::invlog_10(as<T>()) is semantically equivalent to rec(log(T(10)).


Example

See it live on Compiler Explorer

#include <eve/constant/invlog_10.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float>;
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::endl
<< "-> invlog_10(as<wide_ft>()) = " << eve::invlog_10(eve::as<wide_ft>()) << std::endl
<< "-> invlog_10(as(wxf)) = " << eve::invlog_10(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> invlog_10(as<float>()) = " << eve::invlog_10(eve::as(float())) << std::endl
<< "-> invlog_10(as<xf)) = " << eve::invlog_10(eve::as(xf)) << std::endl;
return 0;
}
constexpr callable_invlog_10_ invlog_10
Callable object computing 1/log(10).
Definition: invlog_10.hpp:54
Wrapper for SIMD registers.
Definition: wide.hpp:65