hello.
What is a good way to bin float precision numbers? something like this, but perhaps more efficient?
x = 1;
for i = 0,size-1 { // loop over number of bins
if (value > x) {
++bin[i]; return;
}
x *= 0.1;
}
++bin[size-1]; // increment last bins
I have thought of getting exponent directly, frexp
, and using that.
Is it worthwhile?