E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ minf

auto eve::minf = functor<minf_t>
inlineconstexpr

Defined in Header

#include <eve/module/core.hpp>

Callable Signatures

namespace eve
{
template<floating_value> constexpr T minf(as<T> x) noexcept;
}
constexpr auto minf
Computes the -infinity ieee value.
Definition minf.hpp:66
EVE Main Namespace.
Definition abi.hpp:18
Lightweight type-wrapper.
Definition as.hpp:29

Parameters

  • x : Type wrapper instance embedding the type of the constant.

Return value

The call eve::minf(as<T>()) is semantically equivalent to T(-std::numeric_limits<eve::element_type_t<T>>::`infinity())

Example

#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
using wide_ft = eve::wide<float>;
template<typename T>
consteval auto constexpr_minf() { return eve::minf(eve::as<T>{}); }
int main()
{
wide_ft wxf;
std::cout << "---- simd" << std::endl
<< "-> minf(as<wide_ft>()) = " << eve::minf(eve::as<wide_ft>()) << std::endl
<< "-> minf(as(wxf)) = " << eve::minf(eve::as(wxf)) << std::endl;
double xf;
std::cout << "---- scalar" << std::endl
<< "-> minf(as<float>()) = " << eve::minf(eve::as(float())) << std::endl
<< "-> minf(as<xf)) = " << eve::minf(eve::as(xf)) << std::endl;
std::cout << "-> constexpr minf = " << constexpr_minf<float>() << std::endl;
return 0;
}
Wrapper for SIMD registers.
Definition wide.hpp:70