E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ log10_e

eve::log10_e = functor<log10_e_t>
inlineconstexpr

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T log10_e(as<T> x) noexcept;
}
constexpr auto log10_e
Callable object computing the constant .
Definition: log10_e.hpp:77
EVE Main Namespace.
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::log10_e(as<T>()) returns \(\log_{10}e\).

Example

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