src/iterate.rs

changeset 25
d14c877e14b7
parent 5
59dc4c5883f4
equal deleted inserted replaced
24:8efa7abce7c7 25:d14c877e14b7
438 }, 438 },
439 &Verbose::EveryAndInitial{ every, initial } => { 439 &Verbose::EveryAndInitial{ every, initial } => {
440 iter <= initial || (every != 0 && iter % every == 0) 440 iter <= initial || (every != 0 && iter % every == 0)
441 }, 441 },
442 &Verbose::Logarithmic(base) => { 442 &Verbose::Logarithmic(base) => {
443 let every = 10usize.pow((iter as float).log(base as float).floor() as u32); 443 let every = base.pow((iter as float).log(base as float).floor() as u32);
444 iter % every == 0 444 iter % every == 0
445 } 445 }
446 } 446 }
447 } 447 }
448 } 448 }

mercurial