summaryrefslogtreecommitdiff
path: root/sal/qa/inc/valueequal.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa/inc/valueequal.hxx')
-rw-r--r--sal/qa/inc/valueequal.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sal/qa/inc/valueequal.hxx b/sal/qa/inc/valueequal.hxx
index 2f39594529a6..563314d9e82e 100644
--- a/sal/qa/inc/valueequal.hxx
+++ b/sal/qa/inc/valueequal.hxx
@@ -17,8 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
#include <math.h>
+#include <sal/mathconf.h>
+
#define PREC_float 1
#define PREC_double 2
#define PREC_long_double 3
@@ -26,6 +30,10 @@
template<class T>
bool is_equal(T x, T y, sal_Int16 _nPrec)
{
+ if (!(SAL_MATH_FINITE(x) && SAL_MATH_FINITE(y))) {
+ return x == y;
+ }
+
// due to the fact that this check looks only if both values are equal
// we only need to look on one value