}
else {
if (fabs (s->score) < fabs (w) && signbit (s->score) == signbit (w)) {
- /* Replace less weight with a bigger one */
- diff = metric_res->score - s->score + w;
+ /* Replace less significant weight with a more significant one */
+ diff = w - s->score;
}
else {
diff = 0;
if (task && metric_name) {
if ((metric_res =
g_hash_table_lookup (task->results, metric_name)) != NULL) {
+ msg_debug_task ("set metric score from %.2f to %.2f",
+ metric_res->score, nscore);
metric_res->score = nscore;
lua_pushboolean (L, true);
}