Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73360 - trunk/boost/math/distributions
From: pbristow_at_[hidden]
Date: 2011-07-25 12:49:35


Author: pbristow
Date: 2011-07-25 12:49:34 EDT (Mon, 25 Jul 2011)
New Revision: 73360
URL: http://svn.boost.org/trac/boost/changeset/73360

Log:
Corrected wrong code in uniform.hpp for >upper or < lower
 wrong test values in uniform cdf complemented.

Trac ticket #5733
Text files modified:
   trunk/boost/math/distributions/uniform.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: trunk/boost/math/distributions/uniform.hpp
==============================================================================
--- trunk/boost/math/distributions/uniform.hpp (original)
+++ trunk/boost/math/distributions/uniform.hpp 2011-07-25 12:49:34 EDT (Mon, 25 Jul 2011)
@@ -248,11 +248,11 @@
     }
     if (x < lower)
     {
- return 0;
+ return 1;
     }
     if (x > upper)
     {
- return 1;
+ return 0;
     }
     return (upper - x) / (upper - lower);
   } // RealType cdf(const complemented2_type<uniform_distribution<RealType, Policy>, RealType>& c)


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk