Will “min to max” uniform real distribution produce Inf,-Inf, or NaN?
问题 If I were to produce floating point values in the following way: template <typename T> T RandomFromRange(T low, T high){ std::random_device random_device; std::mt19937 engine{random_device()}; std::uniform_real_distribution<T> dist(low, high); return dist(engine); } template <typename T> T GetRandom(){ return RandomFromRange (std::numeric_limits<T>::min(),std::numeric_limits<T>::max()); } //produce floating point values: auto num1 = GetRandom<float>(); auto num2 = GetRandom<float>(); auto