diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-05-22 18:29:35 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-22 18:29:35 +0200 |
commit | 4330085f141327ee494bb541d4f2f291dd1c590b (patch) | |
tree | 644eb3e5e53615c8d667426a47877b7ac2b8409f /sal/qa/inc/valueequal.hxx | |
parent | c8945b3fb850985794efcb8afbbdc2f5985d7088 (diff) |
Avoid undef conversion from log10(INF) = INF to sal_Int32
Change-Id: Iffe85763097829cb04b766314077b5f2a9b5b8d5
Diffstat (limited to 'sal/qa/inc/valueequal.hxx')
-rw-r--r-- | sal/qa/inc/valueequal.hxx | 8 |
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 |