Skip to content

Commit 055fa46

Browse files
committed
simplify std::log
log / log(2) is log2. Signed-off-by: Rosen Penev <[email protected]>
1 parent eda7171 commit 055fa46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ std::istream& fromStreamToRational(std::istream& is, T& r) {
216216
char F = 0;
217217
float f = 0.F;
218218
is >> F >> f;
219-
f = 2.0F * std::log(f) / std::log(2.0F);
219+
f = 2.0F * std::log2(f);
220220
r = Exiv2::floatToRationalCast(f);
221221
} else {
222222
int32_t nominator = 0;

0 commit comments

Comments
 (0)