qznc:

I want to generate a random "double" value, excluding wierdos like NaN and Infinity. However, std.random.uniform seems to be useless.

Can you explain why you need uniform doubles in their whole range? I think I have never had to generate them so far. Maybe for a unittest?

Also note by their nature doubles are not equally spread across the line of Reals, so getting a truly uniform distribution is hard or impossible.

Bye,
bearophile

Reply via email to