We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66b1788 commit e922b8dCopy full SHA for e922b8d
src/specs/cnf/SpecManagerCnf.hpp
@@ -213,8 +213,9 @@ class SpecManagerCnf : public SpecManager {
213
}
214
215
inline int hg_heuristic_scaled(Var v, int max) {
216
- int value = hg_heuristic(v);
217
- int ret = max / 100 - value;
+ auto value = static_cast<double>(hg_heuristic(v));
+ auto max_double = static_cast<double>(max);
218
+ auto ret = 100 - static_cast<int>((value / max_double) * 100);
219
220
if (ret < 1) {
221
ret = 1;
0 commit comments