Skip to content

Commit e52617c

Browse files
committed
Simplify formula
1 parent 38b2ac3 commit e52617c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

include/gemmi.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ struct MatrixSplit {
104104
// to shift correctly.
105105
frexp(this->powersVector[i], this->scalingExponents.data() + i);
106106
const auto largest_log = log2(this->powersVector[i]);
107-
auto temp = ceil(largest_log) +
108-
(ceil(largest_log) == floor(largest_log) ? 1 : 0);
109-
this->powersVector[i] = std::ldexp(1.0, temp);
107+
this->powersVector[i] = std::ldexp(1.0, floor(largest_log) + 1);
110108
}
111109
}
112110

0 commit comments

Comments
 (0)