From 1d7e88d7cb05c7b4c4a07240cac25afd48d69a4e Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 8 Apr 2020 12:43:14 +0200 Subject: [PATCH] ex-1: make KS test output match the other tests --- ex-1/main.c | 4 ++-- ex-1/tests.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ex-1/main.c b/ex-1/main.c index 0ef359d..21214d0 100644 --- a/ex-1/main.c +++ b/ex-1/main.c @@ -66,8 +66,8 @@ int main(int argc, char** argv) { // print the results fprintf(stderr, "\n## Results\n"); - fprintf(stderr, "D: %f\n", D); - fprintf(stderr, "α: %g\n", 1 - beta); + fprintf(stderr, "D=%g\n", D); + fprintf(stderr, "p=%.3f\n", 1 - beta); /* Mode comparison diff --git a/ex-1/tests.c b/ex-1/tests.c index 9d54ba7..f080079 100644 --- a/ex-1/tests.c +++ b/ex-1/tests.c @@ -35,9 +35,9 @@ double kolmogorov_cdf(double D, int n) { gsl_sum_levin_utrunc_accel(terms, n_terms, s, &sum, &abserr); fprintf(stderr, "\n## Kolmogorov CDF\n"); - fprintf(stderr, "accel sum: %f\n", sum); - fprintf(stderr, "plain sum: %f\n", s->sum_plain); - fprintf(stderr, "err: %f\n", abserr); + fprintf(stderr, "accel sum: %g\n", sum); + fprintf(stderr, "plain sum: %g\n", s->sum_plain); + fprintf(stderr, "err: %g\n", abserr); gsl_sum_levin_utrunc_free(s); free(terms);