E.V.E
v2023.02.15

◆ negabsmin

eve::negabsmin = {}
inlineconstexpr

Computes the negated absolute value of the minimal element.

This is equivalent to -eve::abs ( eve::min(...) ). but can be subject to optimizations.

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template< eve::value T, eve::value... Ts>
eve::common_value_t<T, Ts ...> negabsmin( T x, Ts ... xs ) noexcept;
}
Definition: value.hpp:31
constexpr callable_negabsmin_ negabsmin
Computes the negated absolute value of the minimal element.
Definition: negabsmin.hpp:73
Definition: abi.hpp:18
typename eve::detail::common_value_impl< void, Ts... >::type common_value_t
Computes the SIMD-compatible common type between all Ts.
Definition: common_value.hpp:50

Parameters

Return value

The negated absolute value of the minimal element is returned.

Note
If any element of the inputs is a NaN, the corresponding output element is system-dependent.

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
wide_ft pf = {0.0f, 1.0f, 1.0f, -2.0f, 2.0f,
wide_ft qf = {4.0f, 1.0f, -1.0f, 0.0f, -3.0f,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
<< "-> negabsmin(pf, qf) = " << eve::negabsmin(pf, qf) << '\n'
<< "-> pedantic(negabsmin)(pf, qf) = " << eve::pedantic(eve::negabsmin)(pf, qf) << '\n'
<< "-> numeric(negabsmin)(pf, qf) = " << eve::numeric(eve::negabsmin)(pf, qf) << '\n';
float xf = -4.0f;
float yf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
<< "-> negabsmin(xf, yf) = " << eve::negabsmin(xf, yf) << '\n'
<< "-> pedantic(negabsmin)(xf, yf) = " << eve::pedantic(eve::negabsmin)(xf, yf) << '\n'
<< "-> numeric(negabsmin)(xf, yf) = " << eve::numeric(eve::negabsmin)(xf, yf) << '\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
constexpr pedantic_type const pedantic
Higher-order Callable Object imbuing more standard semantic onto other Callable Objects.
Definition: pedantic.hpp:56
constexpr numeric_type const numeric
Higher-order Callable Object imbuing non invalid return preference semantic onto other Callable Objec...
Definition: numeric.hpp:53
Lightweight type-wrapper.
Definition: as.hpp:29
Wrapper for SIMD registers.
Definition: wide.hpp:65

Semantic Modifiers