2 ms·
IEEE doubles are just 64-bit words; so there are 2^64 and you sample randomly by picking a random 64-bit word. (There are some subtleties: a "random 64-bit wor
by JoachimSchipper 15y ago
IEEE doubles are just 64-bit words; so there are 2^64 and you sample randomly by picking a random 64-bit word.
(There are some subtleties: a "random 64-bit word interpreted as a double" is clearly not uniformly distributed over the reals; x86/amd64 uses 80-bit doubles for intermediate results, except when it doesn't; there are things like subnormals ("really small numbers"), Not-a-Number, Infinity, -Infinity, -0; but the above should give you the right general idea)
- nemoniac 15y agoSure, but to take an extreme example, suppose you have a division operator that fails to check for division-by-zero. Then your operator works in 100 * (1 - 2^63)% of all cases. That gives you 18 nines and sounds pretty convincing but it's hardly the point. In the same way I'm wondering how meaningful it is to say that an algorithm works for 99.49% of all doubles, sampled uniformly. In other words, how could I use that benchmark to make a judgement about using grisu3?