From 2f8b2679c4e4d7f482d726ebfee201035d6e3192 Mon Sep 17 00:00:00 2001 From: Dennis Schafroth Date: Fri, 20 Apr 2012 10:33:51 +0200 Subject: [PATCH] Round approx --- src/client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client.c b/src/client.c index eee0396..dcbfd6c 100644 --- a/src/client.c +++ b/src/client.c @@ -1328,7 +1328,7 @@ Odr_int client_get_hits(struct client *cl) Odr_int client_get_approximation(struct client *cl) { if (cl->record_offset > 0) { - Odr_int approx = (cl->hits * (cl->record_offset - cl->filtered)) / cl->record_offset; + Odr_int approx = ((10 * cl->hits * (cl->record_offset - cl->filtered)) / cl->record_offset + 5) /10; yaz_log(YLOG_LOG, "%s: Approx: %lld * %d / %d = %lld ", client_get_id(cl), cl->hits, cl->record_offset - cl->filtered, cl->record_offset, approx); return approx; } -- 1.7.10.4