Logarithmic logging base correction default tip

Tue, 20 Feb 2024 12:33:16 -0500

author
Tuomo Valkonen <tuomov@iki.fi>
date
Tue, 20 Feb 2024 12:33:16 -0500
changeset 25
d14c877e14b7
parent 24
8efa7abce7c7

Logarithmic logging base correction

src/iterate.rs file | annotate | diff | comparison | revisions
--- a/src/iterate.rs	Fri Oct 13 13:32:59 2023 -0500
+++ b/src/iterate.rs	Tue Feb 20 12:33:16 2024 -0500
@@ -440,7 +440,7 @@
                 iter <= initial || (every != 0 && iter % every == 0)
             },
             &Verbose::Logarithmic(base) => {
-                let every = 10usize.pow((iter as float).log(base as float).floor() as u32);
+                let every = base.pow((iter as float).log(base as float).floor() as u32);
                 iter % every == 0
             }
         }

mercurial