E.V.E
v2022.09.01

◆ log_abs

eve::log_abs = {}
inlineconstexpr

Callable object computing the natural logarithm of the absolute value of the input.

Defined in Header

#include <eve/module/math.hpp>

Callable Signatures

namespace eve
{
template< eve::floating_value T > //1
T log_abs(T x) noexcept;
template< eve::floating_value T >
T log_abs(eve::complex<T> z) noexcept; //2
}
constexpr callable_log_abs_ log_abs
Callable object computing the natural logarithm of the absolute value of the input.
Definition: log_abs.hpp:56
Definition: all_of.hpp:22
SIMD-compatible representation of complex numbers.
Definition: complex.hpp:40

Parameters

Return value

Returns elementwise the natural logarithm of the absolute value of the input.

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'
<< "-> log_abs(pf) = " << eve::log_abs(pf) << '\n'
;
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "-> log_abs(xf) = " << eve::log_abs(xf) << '\n';
return 0;
}
constexpr callable_nan_ nan
Computes the IEEE NaN constant.
Definition: nan.hpp:53
constexpr callable_inf_ inf
Computes the infinity ieee value.
Definition: inf.hpp:58
constexpr pedantic_type const pedantic
Higher-order Callable Object imbuing more standard semantic onto other Callable Objects.
Definition: pedantic.hpp:56
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65