From: Martin Quinson Date: Mon, 14 Nov 2011 15:48:12 +0000 (+0100) Subject: Let's trust the mathematics here: sqrt + fabs + fabs IS positive or nul :) X-Git-Tag: exp_20120216~290 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/35e807ba0b8341d3d001560693ecb0be4ff8ca90?hp=e706356251849dd3b28d2a78355fc0493cfdb4eb Let's trust the mathematics here: sqrt + fabs + fabs IS positive or nul :) --- diff --git a/src/surf/surf_routing_vivaldi.c b/src/surf/surf_routing_vivaldi.c index 014c412922..fe92bb4961 100644 --- a/src/surf/surf_routing_vivaldi.c +++ b/src/surf/surf_routing_vivaldi.c @@ -49,8 +49,6 @@ static double base_vivaldi_get_latency (const char *src, const char *dst) euclidean_dist = sqrt (euclidean_dist_comp(0,src_ctn,dst_ctn)+euclidean_dist_comp(1,src_ctn,dst_ctn)) + fabs(atof(xbt_dynar_get_as(src_ctn, 2, char *)))+fabs(atof(xbt_dynar_get_as(dst_ctn, 2, char *))); - xbt_assert(euclidean_dist>=0, "Euclidean Dist is less than 0\"%s\" and \"%.2f\"", src, euclidean_dist); - //From .ms to .s return euclidean_dist / 1000; }