◆ negabsmin
Callable object computing the negabsmin operation. Required header: Members Functions
requires (compatible_values< T, Ts > && ...);
Definition: value.hpp:31 Parameters
Return value the greatest absolute value is returned. For instance for two elements:
For n parameters the result is computed as if this scheme was recursively used. The result type is the common compatible type of the parameters.
auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::negabsmin Parameters
Return value A Callable object so that the expression Supported decorators
ExampleSee it live on Compiler Explorer #include <eve/function/negabsmin.hpp>
#include <eve/function/pedantic/negabsmin.hpp>
#include <eve/function/numeric/negabsmin.hpp>
#include <eve/wide.hpp>
#include <eve/constant/inf.hpp>
#include <eve/constant/minf.hpp>
#include <eve/constant/nan.hpp>
#include <iostream>
using wide_ft = eve::wide<float, eve::fixed<8>>;
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'
float xf = -4.0f;
float yf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
return 0;
}
constexpr callable_negabsmin_ negabsmin Callable object computing the negabsmin operation. Definition: negabsmin.hpp:104 constexpr callable_minf_ minf Callable object computing the negative infinity value. Definition: minf.hpp:55 constexpr callable_inf_ inf Callable object computing the infinity ieee value. Definition: inf.hpp:54 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:52 |