From f1d7c765e085edef1f67fef997f16363d797fcdc Mon Sep 17 00:00:00 2001
From: Brent Pedersen <bpederse@gmail.com>
Date: Mon, 27 Oct 2014 19:23:48 -0600
Subject: [PATCH] better precision in reporting for fisher

---
 docs/content/tools/fisher.rst | 2 +-
 src/fisher/Fisher.cpp         | 6 ++----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/docs/content/tools/fisher.rst b/docs/content/tools/fisher.rst
index 239328dd..aa771c07 100644
--- a/docs/content/tools/fisher.rst
+++ b/docs/content/tools/fisher.rst
@@ -48,7 +48,7 @@ can do this with ``fisher`` as:
     #_________________________________________
     # p-values for fisher's exact test
     left    right   two-tail    ratio
-    1.00000 0.00001 0.00001 31.667
+    1       1.3466e-05      1.3466e-05      31.667
 
 
 Where we can see the constructed contingency table and the pvalues for left, right
diff --git a/src/fisher/Fisher.cpp b/src/fisher/Fisher.cpp
index 874da58b..3789c495 100644
--- a/src/fisher/Fisher.cpp
+++ b/src/fisher/Fisher.cpp
@@ -56,11 +56,9 @@ bool Fisher::calculate() {
 
     printf("# p-values for fisher's exact test\n");
     printf("left\tright\ttwo-tail\tratio\n");
-    printf("%.5f\t%.5f\t%.5f\t%.3f\n", left, right, two, ratio);
+    printf("%.5g\t%.5g\t%.5g\t%.3f\n", left, right, two, ratio);
     
-    //kt_fisher_exact(50010000, 10000000, 15000000, 3000000, &left, &right, &two);
-
-	return true;
+    return true;
 }
 
 bool Fisher::getFisher() {
-- 
GitLab