I'm just trying to do something. There is a some computation to be done using double-type variables.
We have two parameters "x" and "y" where we need to store log2(x) with y-bit precision.
First thing I need to is
double a = std::log2(x); // x is an input given by a problem
Then, we truncate "a" by just keeping "y"-bit of information after decimal points.
How can we do this?