Computes the minimum of its arguments.
The value of the minimum of the arguments is returned.
#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,
std::cout << "---- simd" << '\n'
<< "<- pf = " << pf << '\n'
<< "<- qf = " << qf << '\n'
<<
"-> min(pf, qf) = " <<
eve::min(pf, qf) <<
'\n';
float xf = 1.0f;
std::cout << "---- scalar" << '\n'
<< "<- xf = " << xf << '\n'
<< "<- yf = " << yf << '\n'
<<
"-> min(xf, yf) = = " <<
eve::min(xf, yf) <<
'\n';
auto k = kumi::tuple{pf, qf, pf+qf, 1};
std::cout << "---- multi parameters" << '\n'
<<
" -> min(k) = " <<
eve::min(k) <<
'\n'
<<
" -> min(kumi::tuple{pf, pf, 1}) = " <<
eve::min( kumi::tuple{pf, qf, 1}) <<
'\n'
<<
" -> min(kumi::tuple{1, pf, pf}) = " <<
eve::min( kumi::tuple{1, pf, qf}) <<
'\n'
<<
" -> numeric(min(kumi::tuple{1.0f, pf, qf) = " <<
eve::numeric(
eve::min)( kumi::tuple{1.0f, pf,qf}) <<
'\n'
<<
" -> min(kumi::tuple{pf, 1.0f) = " <<
eve::min( kumi::tuple{pf, 1.0f}) <<
'\n'
<<
" -> min(kumi::tuple{1.0f, pf) = " <<
eve::min( kumi::tuple{1.0f, pf}) <<
'\n'
<<
" -> numeric(min(kumi::tuple{1.0f, pf) = " <<
eve::numeric(
eve::min)( kumi::tuple{1.0f, pf}) <<
'\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