cmath::ceil didn't worked as expected