From f63ff478d2e5fd555b19c8caae86b11f09dcff65 Mon Sep 17 00:00:00 2001 From: Eric Niebler Date: Sat, 28 Feb 2004 21:21:30 +0000 Subject: [PATCH] fix min/max problems [SVN r22408] --- include/boost/random/bernoulli_distribution.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/random/bernoulli_distribution.hpp b/include/boost/random/bernoulli_distribution.hpp index 0421d7f..92c5b20 100644 --- a/include/boost/random/bernoulli_distribution.hpp +++ b/include/boost/random/bernoulli_distribution.hpp @@ -55,7 +55,7 @@ public: if(_p == RealType(0)) return false; else - return RealType(eng() - (eng.min)()) <= _p * RealType(eng.max()-eng.min()); + return RealType(eng() - (eng.min)()) <= _p * RealType((eng.max)()-(eng.min)()); } #if !defined(BOOST_NO_OPERATORS_IN_NAMESPACE) && !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)