有人来访问这个问题吗?每1个实现不需要生成相同的数据.在实践中怎么样 - 在arm,x86,免费和商业编译器中STL实现有很多不同之处?
// g++ --std=c++11 -o a minimal.cpp && ./a
#include <iostream>
#include <random>
using namespace std;
int
main()
{
std::mt19937_64 gen;
gen.seed(17);
cout << "\nNormal\n";
normal_distribution<double> distr1;
for (int i = 0; i < 2; i++) {
double delay = distr1(gen);
printf(" Value = %15.15g\n", delay);
}
return(0);
}
/*
Results
(1) gcc-4.8.0 linux 64b version result
Normal
Value = 1.03167351251536
Value = 1.21967569130525
(2) Microsoft Visual Studio Community 2015 Version 14.0.23107.0 D14REL
or
Microsoft Visual …Run Code Online (Sandbox Code Playgroud)