diff options
-rw-r--r-- | Eigen/src/Core/NumTraits.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Eigen/src/Core/NumTraits.h b/Eigen/src/Core/NumTraits.h index 70ea7ef9e..a0ffa4645 100644 --- a/Eigen/src/Core/NumTraits.h +++ b/Eigen/src/Core/NumTraits.h @@ -84,7 +84,7 @@ template<typename T> struct GenericNumTraits return Real(0); } inline static T highest() { return std::numeric_limits<T>::max(); } - inline static T lowest() { return std::numeric_limits<T>::min(); } + inline static T lowest() { return IsInteger ? std::numeric_limits<T>::min() : (-std::numeric_limits<T>::max()); } }; template<typename T> struct NumTraits : GenericNumTraits<T> |