summaryrefslogtreecommitdiff
path: root/src/lib/math/prob_distr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/math/prob_distr.c')
-rw-r--r--src/lib/math/prob_distr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/math/prob_distr.c b/src/lib/math/prob_distr.c
index f5e5218aa7..e170d000fe 100644
--- a/src/lib/math/prob_distr.c
+++ b/src/lib/math/prob_distr.c
@@ -1308,7 +1308,7 @@ sample_geometric(uint32_t s, double p0, double p)
if (p >= 1)
return 1;
- return (-x/log1p(-p));
+ return ceil(-x/log1p(-p));
}
/*******************************************************************/