|
|
|
|
|
by a1369209993
2690 days ago
|
|
The problem is that: a, there are over a thousand random bits to fill, and you'll need a significantly more sophisticated mechanism to fill them; b, if you need more than a dozen significant digits, 64-bits floats probably aren't what you want anyway; and c, clever tricks aren't the place for rigorous correctness when "correct to within rounding errors" will do just as well. If you really want you could tack on: ret += (entropy >> 63) * 0x1.0p-53; // 1.110223024625156540e-16;
OR
ret += (entropy >> 52) * 0x1.0p-64; // 5.421010862427522170e-20;
right before the return to pack in some extra bits. |
|