Best way to generate a random float in C#
Best approach, no crazed values, distributed with respect to the representable intervals on the floating-point number line (removed “uniform” as with respect to a continuous number line it is decidedly non-uniform): (*) … check here for subnormal floats Warning: generates positive infinity as well! Choose exponent of 127 to be on the safe side. Another approach which will give … Read more