===================================================================
@@ -3770,7 +3770,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @brief A discrete binomial random number distribution.
*
* The formula for the binomial probability density function is
- * @f$p(i|t,p) = \binom{n}{i} p^i (1 - p)^{t - i}@f$ where @f$t@f$
+ * @f$p(i|t,p) = \binom{t}{i} p^i (1 - p)^{t - i}@f$ where @f$t@f$
* and @f$p@f$ are the parameters of the distribution.
*/
template<typename _IntType = int>
===================================================================
@@ -1657,13 +1657,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
do
{
+ if (__t == __x)
+ return __x;
const double __e = -std::log(1.0 - __aurng());
- if (__t == __x)
- {
- if (__e)
- return __x;
- continue;
- }
__sum += __e / (__t - __x);
__x += 1;
}