Skip to content

Commit

Permalink
Merge pull request #206 from ssim/search_bug_fix
Browse files Browse the repository at this point in the history
Minor but critical fix to binary search (reverse)
  • Loading branch information
ssim committed Dec 5, 2014
2 parents 4cce1de + fd81e07 commit bce374b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tardis/cmontecarlo.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ reverse_binary_search (double *x, double x_insert,
}
imid = (imin + imax) / 2;
}
if (imax - imid == 2 && x_insert < x[imin + 1])
if (imax - imin == 2 && x_insert < x[imin + 1])
{
*result = imin + 1;
}
Expand Down

0 comments on commit bce374b

Please sign in to comment.