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

◆ maxlog10

eve::maxlog10 = functor<maxlog10_t>
inlineconstexpr

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T maxlog10(as<T> x) noexcept;
}
constexpr auto maxlog10
Callable object computing the greatest positive value for which eve::exp10 is finite.
Definition: maxlog10.hpp:74
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::maxlog10(as<T>()) returns the greatest positive value for which eve::exp10 is finite.

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_maxlog10() { return eve::maxlog10(eve::as<T>{}); }
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::setprecision(9) << std::endl
<< "-> maxlog10(as<wide_ft>()) = " << eve::maxlog10(eve::as<wide_ft>()) << std::endl
<< "-> maxlog10(as(wxf)) = " << eve::maxlog10(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> maxlog10(as<float>()) = " << eve::maxlog10(eve::as(float())) << std::endl
<< "-> maxlog10(as<xf)) = " << eve::maxlog10(eve::as(xf)) << std::endl;
std::cout << "-> constexpr maxlog10 = " << constexpr_maxlog10<float>() << std::endl;
return 0;
}
Wrapper for SIMD registers.
Definition: wide.hpp:71