E.V.E
v2022.09.01

◆ exp10

eve::exp10 = {}
inlineconstexpr

Callable object computing \(10^x\).

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T >
T exp10(T x) noexcept; //1
template< eve::floating_value T >
}
constexpr callable_exp10_ exp10
Callable object computing .
Definition: exp10.hpp:98
Definition: all_of.hpp:22
SIMD-compatible representation of complex numbers.
Definition: complex.hpp:40

Parameters

Return value

  1. Returns the elementwise exponential of base 10 of the input. In particular, for floating inputs:
    • If the element is \(\pm0\), \(1\) is returned
    • If the element is \(-\infty\), \(+0\) is returned
    • If the element is \(\infty\), \(\infty\) is returned
    • If the element is a NaN, NaN is returned
  2. Returns elementwise the exponential of base 10 of the input as if computed by eve::exp (eve::log_10(as(z))*z).

Example

#include <eve/module/math.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.0f, -0.0f, -1.0f, 1.0f, 2.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "-> exp10(pf) = " << eve::exp10(pf) << '\n'
;
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> exp10(xf) = " << eve::exp10(xf) << '\n';
return 0;
}
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
constexpr callable_minf_ minf
Computes the -infinity ieee value.
Definition: minf.hpp:60
constexpr callable_inf_ inf
Computes the infinity ieee value.
Definition: inf.hpp:58
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65

Semantic Modifiers

  • Masked Call

    The call eve::exp10[mask](x) provides a masked version of eve::exp10 which is equivalent to if_else (mask, exp10(x), x).

    Example

    #include <eve/module/math.hpp>
    #include <eve/wide.hpp>
    #include <iostream>
    int main()
    {
    wide_ft pf = {0.0f, -0.0f, -1.0f, 1.0f, 2.0f,
    std::cout << "---- simd" << '\n'
    << "<- pf = " << pf << '\n'
    << "-> exp[pf > 1.0](pf) = " << eve::exp[pf > 1.0](pf) << '\n';
    return 0;
    }
    constexpr callable_exp_ exp
    Callable object computing .
    Definition: exp.hpp:97