Skip to content

Commit 5cf5ac0

Browse files
committed
added explicit conversion to float
1 parent eb5c695 commit 5cf5ac0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/src/dual_simplex/branch_and_bound.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,9 @@ void branch_and_bound_t<i_t, f_t>::add_feasible_solution(f_t leaf_objective,
534534
f_t lower_bound = get_lower_bound();
535535
f_t obj = compute_user_objective(original_lp_, upper_bound_);
536536
f_t lower = compute_user_objective(original_lp_, lower_bound);
537-
f_t iter_node = nodes_explored > 0 ? exploration_stats_.total_lp_iters / nodes_explored : 0;
537+
f_t iter_node = nodes_explored > 0 ? static_cast<f_t>(exploration_stats_.total_lp_iters) /
538+
static_cast<f_t>(nodes_explored)
539+
: 0;
538540
settings_.log.printf("%s%10d %10lu %+13.6e %+10.6e %6d %7.1e %s %9.2f\n",
539541
feasible_solution_symbol(thread_type),
540542
nodes_explored,

0 commit comments

Comments
 (0)