Random bytes can be read directly in the float (for example, float f; read(fd, &f, sizeof(f)); ); assuming IEEE-754, all bit patterns are valid (although there are two infinities and many quiet and signal NaNs). You can use ieee754.h or fpclassify.h to determine if you deleted one of them.
Of course, whether this is reasonable depends on what kind of distribution you want. Assuming that IEEE-754 float32 , you will get a uniform distribution over all ranges [0, 2 -126 ) and [2 -126 2] -125 ), [2 -125 2 -124 ), ..., [2 127 2 128 ) normals (and their negatives).
source share