From: David Gow Date: Wed, 9 Apr 2014 08:22:34 +0000 (+0800) Subject: Fix RealToFloat test (hopefully) X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=commitdiff_plain;h=b0c05b83db47aa91cb2da4244f1401aaf2c41ba0;hp=8e8a5a3e29f4f5741cdbdf4e69dd966e5c89c05d Fix RealToFloat test (hopefully) --- diff --git a/src/tests/realtofloat.cpp b/src/tests/realtofloat.cpp index 32ee20b..c475ea9 100644 --- a/src/tests/realtofloat.cpp +++ b/src/tests/realtofloat.cpp @@ -12,9 +12,9 @@ int main(int argc, char ** argv) { float test = test_min + (test_max-test_min)*((float)(rand() % (int)1e6)/1e6); Real real(test); - float thiserror = abs(test - real.value); + float thiserror = abs(test - Float(real)); error += thiserror; - Debug("#%u: |test %.20f - real %.20f| = %.20f [mean %f]", i, test, real.value, thiserror, error/(i+1)); + Debug("#%u: |test %.20f - real %.20f| = %.20f [mean %f]", i, test, Float(real), thiserror, error/(i+1)); } if (error/test_count > error_thresh)