diff options
| -rw-r--r-- | exp_3.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -12,6 +12,8 @@ int main() { std::vector<long long> vector1, vector2; + std::vector<long double> E; + std::set<long long> set1, set2; FILE *file = fopen("normal_distribution.txt", "r"); @@ -74,9 +76,15 @@ int main() { } // printf("%lld %lld %lld ", *ita, *it, *itb); long double res = (cnt2 + (*iter - *ita) / dx) / (sample_length - 1); - e += std::abs(res - (long double)cnt1 / (length - 1)); + auto single_e = std::abs(res - (long double)cnt1 / (length - 1)); + E.push_back(single_e); + e += single_e; printf("%.4Lf ", res * 100); } printf("\n%.4Lf", e); + for (auto element : E) { + printf("%.8Lf ", element); + } + puts(""); return 0; }
\ No newline at end of file |
