3 ms·
I don't think such a function would be a good default, but I think there may be applications, probably some complex very large simulations, where this might mat
by camel-cdr 3y ago
I don't think such a function would be a good default, but I think there may be applications, probably some complex very large simulations, where this might matter.
- leiroigh 3y agoYou think there might be applications like complex very large simulations where an event with probability 1:10^38 matters? You are aware that the current age of the universe is < 10^27 nanoseconds, just for comparison?
- camel-cdr 3y agoBut what if you want a random number between two very small floats?
- leiroigh 3y agoFair enough, if a user asks for a random float between [0, 1e-38f] then subnormals are expected. I was just thinking about the (0,1) case, under the mistaken assumption that one could map it to (a,b) via multiplication/addition, but you're right -- if you want (a,b) perfectly () then it's not obvious to me. () up to inaccuracies of cosmologically negligible scale