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

◆ log_10

auto eve::log_10 = functor<log_10_t>
inlineconstexpr

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T log_10(as<T> x) noexcept;
}
constexpr auto log_10
Callable object computing the constant .
Definition log_10.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::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>;
template<typename T>
consteval auto constexpr_log_10() { return eve::log_10(eve::as<T>{}); }
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;
std::cout << "-> constexpr log_10 = " << constexpr_log_10<float>() << std::endl;
return 0;
}
Wrapper for SIMD registers.
Definition wide.hpp:70