chiark
/
gitweb
/
~mdw
/
mm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
a8a6853
)
mm.c (run_all): Move `double' cast to prevent integer overflow.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 12 Sep 2018 10:38:16 +0000
(11:38 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Thu, 5 Sep 2019 13:09:49 +0000
(14:09 +0100)
mm.c
patch
|
blob
|
blame
|
history
diff --git
a/mm.c
b/mm.c
index e8922e868ea6993e4622177bec0bef72b0e37fbd..c5690a513ea8127a1a95944cb9cc199001bbd90e 100644
(file)
--- a/
mm.c
+++ b/
mm.c
@@
-601,7
+601,7
@@
static void run_all(const mm *m)
for (i = 1; i < DA_LEN(&a.gmap); i++)
printf("%2u guesses: %5u games\n", i, DA(&a.gmap)[i]);
printf("Average: %.4f (%.2fs)\n",
- (double)a.g/a.n,
(double)a.t/(a.n *
CLOCKS_PER_SEC));
+ (double)a.g/a.n,
a.t/(a.n * (double)
CLOCKS_PER_SEC));
}
/*----- Main game logic ---------------------------------------------------*/