diff options
Diffstat (limited to 'normal_distribution.cpp')
| -rw-r--r-- | normal_distribution.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/normal_distribution.cpp b/normal_distribution.cpp new file mode 100644 index 0000000..c9cf701 --- /dev/null +++ b/normal_distribution.cpp @@ -0,0 +1,17 @@ +#include <algorithm> +#include <cstdio> +#include <random> +int main() { + + std::random_device randomDevice; + std::mt19937 randomEngine(randomDevice()); + std::normal_distribution<long double> normalDistribution(2147483647, + 2147483647); + + for (int i = 0; i < 1048576; i++) { + printf("%llu\n", + (unsigned long long)std::round(normalDistribution(randomEngine))); + } + + return 0; +}
\ No newline at end of file |
