fix allFinite
Reference issue
What does this implement/fix?
DenseBase::allFinite can return 'false' for integer arrays, which is incorrect. std::numeric_limits<int>::infinity() is usually defined as 0. Actually its probably worse: since we implement this as abs(x) < infinity, this turns into abs(x) < 0, which is always false!
https://godbolt.org/z/4M96Gjxxb
Also added a check for gcc/clang/arm's __FINITE_MATH_ONLY__ macro. These platforms appear to consistently optimize std::isfinite to return true when compiled with -ffinite-math-only. Clang sets infinity to zero, which has the same effect described above. If this macro is set, allFinite will now return true for any expression.
Additional information
Edited by Charles Schlosser