+ /*
+ * When computing n_max_frags, we want to set a value that will skip
+ * anything that won't provide strictly better solutions. So we
+ * want
+ * frags < n / best
+ * _ _
+ * <=> frags < | n / best |
+ * _ _
+ * <=> frags <= | n / best | - 1
+ */
+ n_max_frags = ceil(n / best) - 1;
+ m_max_frags = ceil(m / best) - 1;