E.V.E
v2022.03.00

◆ log_10

eve::log_10 = {}
inlineconstexpr

Callable object computing the constant \(\log 10\).

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::value T >
T log_10(as<T> x) noexcept;
}
constexpr callable_log_10_ log_10
Callable object computing the constant .
Definition: log_10.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::log_10(as<T>()) returns \(\log 10\).

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