Please explain in detail the code?

I have such code, I can say that it does
if(number <= 0) return 1;
 double multi_factor = 1;
 std::cout << std::endl;
 while((buffer = number * multi_factor) >= 1){
 std::cout << buffer << " ";
 multi_factor /= 2;
 if(buffer % 2 != 0) break;
March 12th 20 at 08:01
1 answer
March 12th 20 at 08:03
Solution
At the entrance are a number. The code divides this number in half until it becomes odd. And at each step outputs the result. But it looks wildly inefficient, it may be wrong.

Find more questions by tags C++