projects
/
assignment-template.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f86ecf
)
one_gaussian_bump.c: Increase printed precision
author
W. Trevor King
<wking@tremily.us>
Tue, 12 Feb 2013 22:19:07 +0000
(17:19 -0500)
committer
W. Trevor King
<wking@tremily.us>
Tue, 12 Feb 2013 22:19:07 +0000
(17:19 -0500)
one_gaussian_bump.c
patch
|
blob
|
history
diff --git
a/one_gaussian_bump.c
b/one_gaussian_bump.c
index bc67e44d6457344ca4a77f2105afd5d9ed2b44d8..f3a4646e2ca3942c970a2c008006a30f384890bc 100644
(file)
--- 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.10
g", state->t);
for (i = 0; i < state->n; i++)
- printf("\t%g", state->x[i]);
+ printf("\t%
0.10
g", state->x[i]);
if (system->energy_fn) {
energy = (*system->energy_fn)(state, (void *)system);
- printf("\t%g", energy);
+ printf("\t%
0.10
g", energy);
}
printf("\n");
}