From: W. Trevor King Date: Tue, 12 Feb 2013 22:19:07 +0000 (-0500) Subject: one_gaussian_bump.c: Increase printed precision X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7c4fb34741837f89bf51e6733a2aaa954d864f73;p=assignment-template.git one_gaussian_bump.c: Increase printed precision --- diff --git a/one_gaussian_bump.c b/one_gaussian_bump.c index bc67e44..f3a4646 100644 --- a/one_gaussian_bump.c +++ b/one_gaussian_bump.c @@ -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"); }