summaryrefslogtreecommitdiff
path: root/normal_distribution.cpp
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2022-06-17 00:29:54 +0800
committerKunoiSayami <[email protected]>2022-06-17 00:29:54 +0800
commitb642c58f9d8750804b95f6ab9ccbfbee1f5a671d (patch)
tree4e87e132ede7a5634899638e3eaeaaf2a44dfdf3 /normal_distribution.cpp
parentd3362a1d4c8af292365e16d466d3f57bb0af326f (diff)
feat: Finish implement measure time function
* feat: Add normal_distribution program Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'normal_distribution.cpp')
-rw-r--r--normal_distribution.cpp17
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