From b642c58f9d8750804b95f6ab9ccbfbee1f5a671d Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Fri, 17 Jun 2022 00:29:54 +0800 Subject: feat: Finish implement measure time function * feat: Add normal_distribution program Signed-off-by: KunoiSayami --- normal_distribution.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 normal_distribution.cpp (limited to 'normal_distribution.cpp') 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 +#include +#include +int main() { + + std::random_device randomDevice; + std::mt19937 randomEngine(randomDevice()); + std::normal_distribution 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 -- cgit v1.3.1