◆ log1p
Callable object computing the natural logarithm of \(1+x\): \(\log(1+x)\). Required header: Members Functions
Definition: value.hpp:83 Parameters Return value Returns the elementwise the natural log1parithm of In particular, for floating inputs:
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::log1p Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/log1p.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<4>>;
using wide_it = eve::wide<std::int16_t, eve::fixed<4>>;
int main()
{
wide_ft pf = {-1.0f, 2.0f, -0.0f, 0.0f};
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
float xf = 3.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
return 0;
}
constexpr callable_log1p_ log1p Callable object computing the natural logarithm of : . Definition: log1p.hpp:85 |