From 909402667339bfe01285acf3e0ed973be0849a7e Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Tue, 8 Apr 2008 16:46:00 +0200 Subject: [PATCH] test_bound.cc: avoid loss of precision caused by conversion from double to int --- test_bound.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_bound.cc b/test_bound.cc index 1f3994d..8a7dc1f 100644 --- a/test_bound.cc +++ b/test_bound.cc @@ -166,7 +166,7 @@ static int test_bound(const struct check_poly_data *data, assert(value_ge(approx, exact)); value_subtract(approx, approx, exact); - error = ::abs(VALUE_TO_DOUBLE(approx)) / VALUE_TO_DOUBLE(exact); + error = fabs(VALUE_TO_DOUBLE(approx)) / VALUE_TO_DOUBLE(exact); if (options->print_all) fprintf(stderr, " (%g)", error); tb_data->result->RE_sum[i] += error; -- 2.11.4.GIT