11#ifndef TLAPACK_BASE_STRONGZERO_HH
12#define TLAPACK_BASE_STRONGZERO_HH
54 template <
typename T,
typename U>
64 explicit constexpr operator T()
const noexcept
92 return (
lhs = std::numeric_limits<T>::infinity());
102 template <
typename T>
103 friend constexpr T operator+(
StrongZero,
const T&
rhs)
noexcept
108 template <
typename T>
109 friend constexpr T operator+(
const T&
lhs,
StrongZero)
noexcept
119 template <
typename T>
120 friend constexpr T operator-(
StrongZero,
const T&
rhs)
noexcept
125 template <
typename T>
126 friend constexpr T operator-(
const T&
lhs,
StrongZero)
noexcept
136 template <
typename T>
142 template <
typename T>
150 return std::numeric_limits<float>::quiet_NaN();
153 template <
typename T>
159 template <
typename T>
160 friend constexpr T operator/(
const T&,
StrongZero)
noexcept
162 return std::numeric_limits<T>::infinity();
171 constexpr bool operator==(
StrongZero)
const noexcept {
return true; }
172 constexpr bool operator!=(
StrongZero)
const noexcept {
return false; }
173 constexpr bool operator>(
StrongZero)
const noexcept {
return false; }
175 constexpr bool operator>=(
StrongZero)
const noexcept {
return true; }
177 friend constexpr bool isinf(
StrongZero)
noexcept {
return false; }
178 friend constexpr bool isnan(
StrongZero)
noexcept {
return false; }
190 friend constexpr int pow(
int,
StrongZero)
noexcept {
return 1; }
191 friend constexpr float log2(
StrongZero)
noexcept
193 return -std::numeric_limits<float>::infinity();
208 template <
typename T>
212 template <
typename T>
219 constexpr static bool is_real =
true;
223 template <
typename T>
228 template <
typename T>
243struct std::numeric_limits<tlapack::StrongZero> {
244 static constexpr bool is_specialized =
true;
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113
constexpr bool is_complex
True if T is a complex scalar type.
Definition scalar_type_traits.hpp:192
constexpr bool is_real
True if T is a real scalar type.
Definition scalar_type_traits.hpp:117
Strong zero type.
Definition StrongZero.hpp:43
Complex type traits for the list of types Types.
Definition scalar_type_traits.hpp:145
Real type traits for the list of types Types.
Definition scalar_type_traits.hpp:71