one_gaussian_bump.c: Increase printed precision
authorW. Trevor King <wking@tremily.us>
Tue, 12 Feb 2013 22:19:07 +0000 (17:19 -0500)
committerW. Trevor King <wking@tremily.us>
Tue, 12 Feb 2013 22:19:07 +0000 (17:19 -0500)
one_gaussian_bump.c

index bc67e44d6457344ca4a77f2105afd5d9ed2b44d8..f3a4646e2ca3942c970a2c008006a30f384890bc 100644 (file)
@@ -149,12 +149,12 @@ void print_state(state_t *state, system_t *system)
        size_t i;
        double energy;
 
-       printf("%g", state->t);
+       printf("%0.10g", state->t);
        for (i = 0; i < state->n; i++)
-               printf("\t%g", state->x[i]);
+               printf("\t%0.10g", state->x[i]);
        if (system->energy_fn) {
                energy = (*system->energy_fn)(state, (void *)system);
-               printf("\t%g", energy);
+               printf("\t%0.10g", energy);
        }
        printf("\n");
 }