By @rpinho

Refereed correctness bugs in open-source research software, with patches and links to upstream PRs

bf54d4b / bentoayr-Efficient-Projection-onto-the-Perfect-Phylogeny-Model/patches/BENTO-002.patch

Raw
diff --git a/project_onto_PPM.c b/project_onto_PPM.c
index 6524535..3984864 100644
--- a/project_onto_PPM.c
+++ b/project_onto_PPM.c
@@ -916,7 +916,7 @@ realnumber tree_cost_projection(shortint inner_flag, shortint compute_M_flag, re
 
     for (int i = 0; i < num_nodes*T - 1; i++){
         realnumber x = ((realnumber)rand() / (realnumber)(RAND_MAX)) * 2e-6 - 1e-6;
-        data[i] += x;
+        data[i] += x / gamma_init[i / T];
     }
     
     realnumber error_tree_model = 0.0;