summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Locasto <locasto@ucalgary.ca>2013-08-09 23:34:50 (GMT)
committer Michael Locasto <locasto@ucalgary.ca>2013-08-09 23:34:50 (GMT)
commit8062ee1514f939c9013da234f1c37ef06fa66a80 (patch)
tree8a9f58df84d7d74631714fe2f1e8d731536c70d5
parent7221bef1b9bc3f59b097976d8830fb38042231b3 (diff)
parent32cb74c04e1d656432041403a15e7f9f64d8fec9 (diff)
Merge pull request #2 from mmu002/masterHEADmaster
Typo & metric entropy
-rw-r--r--code/README2
-rw-r--r--code/tool/ropy.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/code/README b/code/README
index 6ff384e..1975618 100644
--- a/code/README
+++ b/code/README
@@ -8,7 +8,7 @@ This is a readme file. See
for more information.
-libdisorder is a small, simple C library for use by programmars in
+libdisorder is a small, simple C library for use by programmers in
other programs. There is a small test program included that opens
/dev/urandom and calls libdisorder in the `test/' directory. There is
also a command-line tool, `ropy' in the `tool/' directory for reporting
diff --git a/code/tool/ropy.c b/code/tool/ropy.c
index 02999ae..f5350c9 100644
--- a/code/tool/ropy.c
+++ b/code/tool/ropy.c
@@ -135,9 +135,10 @@ main(int argc,
entropy_value = shannon_H(buffer, how_many_bytes_read);
fprintf(stdout,
- "tokens: %d entropy: %f maxent: %f ratio: %f\n",
+ "tokens: %d entropy: %f metric: %f maxent: %f ratio: %f\n",
get_num_tokens(),
entropy_value,
+ entropy_value/how_many_bytes_read,
get_max_entropy(),
get_entropy_ratio()
);