diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2012-01-24 15:37:36 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2012-01-24 15:37:36 +0100 |
commit | 83a5267651a3aff55589612891cee6b1e4c87041 (patch) | |
tree | 7ac02a22bbe49cc0c679b9189306bd25c54eddc5 /sal/qa/inc | |
parent | 82e0266b05dd53d0ce8b12bd5c76ae25872b87a9 (diff) |
dead code in qa
Diffstat (limited to 'sal/qa/inc')
-rw-r--r-- | sal/qa/inc/valueequal.hxx | 48 |
1 files changed, 3 insertions, 45 deletions
diff --git a/sal/qa/inc/valueequal.hxx b/sal/qa/inc/valueequal.hxx index 23fb4012ee9b..4dc3d78a167b 100644 --- a/sal/qa/inc/valueequal.hxx +++ b/sal/qa/inc/valueequal.hxx @@ -74,56 +74,14 @@ bool is_equal(T x, T y, sal_Int16 _nPrec) if (nDelta > nPrec) { - // printf("values are not equal! ndelta:%.20f\n", nDelta); + // values are not equal return false; } - // else - // { - // printf("values are equal. ndelta:%.20f\n", nDelta); + + // values are equal return true; - // } } -// LLA: bool is_float_equal(float x, float y) -// LLA: { -// LLA: // due to the fact that this check looks only if both values are equal -// LLA: // we only need to look on one value -// LLA: -// LLA: // 6 digits will announce the checkPrecisionSize -// LLA: -// LLA: const sal_Int32 nPRECISION = 6; -// LLA: if (x < 0) -// LLA: { -// LLA: x = -x; -// LLA: } -// LLA: if (y < 0) -// LLA: { -// LLA: y = -y; -// LLA: } -// LLA: -// LLA: printf("double equal: %.20f\n# %.20f\n", x, y); -// LLA: sal_Int32 nPrecOfN = -nPRECISION + sal_Int32( log10(x) ); -// LLA: -// LLA: printf("prec: %d\n", nPrecOfN); -// LLA: double nPrec = pow(10, nPrecOfN) * 1; -// LLA: -// LLA: printf(" prec: %.20f\n", nPrec); -// LLA: -// LLA: double nDelta = fabs( x - y ); -// LLA: printf(" delta: %.20f\n\n", nDelta); -// LLA: -// LLA: if (nDelta > nPrec) -// LLA: { -// LLA: // printf("values are not equal! ndelta:%.20f\n", nDelta); -// LLA: return false; -// LLA: } -// LLA: // else -// LLA: // { -// LLA: // printf("values are equal. ndelta:%.20f\n", nDelta); -// LLA: return true; -// LLA: // } -// LLA: } - bool is_float_equal(float x, float y) { return is_equal<float>(x, y, PREC_float); |