mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix bug #859: pexp(NaN) returned Inf instead of NaN
This commit is contained in:
20
test/main.h
20
test/main.h
@@ -406,6 +406,26 @@ void randomPermutationVector(PermutationVectorType& v, typename PermutationVecto
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T> bool isNotNaN(const T& x)
|
||||
{
|
||||
return x==x;
|
||||
}
|
||||
|
||||
template<typename T> bool isNaN(const T& x)
|
||||
{
|
||||
return x!=x;
|
||||
}
|
||||
|
||||
template<typename T> bool isInf(const T& x)
|
||||
{
|
||||
return x > NumTraits<T>::highest();
|
||||
}
|
||||
|
||||
template<typename T> bool isMinusInf(const T& x)
|
||||
{
|
||||
return x < NumTraits<T>::lowest();
|
||||
}
|
||||
|
||||
} // end namespace Eigen
|
||||
|
||||
template<typename T> struct GetDifferentType;
|
||||
|
||||
Reference in New Issue
Block a user