Skip to content

Commit

Permalink
probably fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Dec 19, 2015
1 parent 5ba3402 commit d92f356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Probability.cpp
Expand Up @@ -37,7 +37,7 @@ SmallKBinomialGenerator::SmallKBinomialGenerator(unsigned int n, float p, unsign

float *pdf = new float[maxK];
// initial values, k=0:
float pTerm = std::pow(1.0f-p, n); // the p^k * (1-p)^(n-k) term
float pTerm = std::pow(1.0f-p, static_cast<float>(n)); // the p^k * (1-p)^(n-k) term
unsigned int coeffN = 1, coeffD = 1; // (N / D) evaluates to the same result as the n!/(k!(n-k)!) term
for (unsigned int k=0; k<maxK; k++)
{
Expand Down

0 comments on commit d92f356

Please sign in to comment.