For integral type there is no difference between eve::zero and eve::mzero, but for floating ones the bit of sign differs.
However, eve::mzero always satisfies the equality predicate with eve::zero and eve::mzero satisfies the predicate is_negative, but not the predicate is_ltz.
Defined in Header
#include <eve/module/core.hpp>
{
template<eve::plain_value T>
constexpr T mzero(
as<T> x)
noexcept;
}
constexpr auto mzero
Computes the negative zero value.
Definition mzero.hpp:74
typename decltype(detail::as_translated_type(as< T >{}))::type translate_t
Returns the final translated type of T.
Definition translation.hpp:107
EVE Main Namespace.
Definition abi.hpp:19
Parameters
x : Type wrapper instance embedding the type of the constant.
Return value
The call eve::mzero(as<T>()) is semantically equivalent to T(-0.0).
#include <eve/module/core.hpp>
#include <eve/wide.hpp>
#include <iostream>
template<typename T>
{
std::cout << "---- simd" << std::endl
std::cout << "---- scalar" << std::endl
<<
"-> mzero(as<std::int16_t>()) = " <<
eve::mzero(
eve::as(std::int16_t())) << std::endl
return 0;
}
Lightweight type-wrapper.
Definition as.hpp:29