Re: [Boost-bugs] [Boost C++ Libraries] #9126: Logistic distribution pdf() and cdf(complement()) fail to catch invalid scale and location parameters

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9126: Logistic distribution pdf() and cdf(complement()) fail to catch invalid scale and location parameters
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-19 15:41:21


#9126: Logistic distribution pdf() and cdf(complement()) fail to catch invalid
scale and location parameters
---------------------------------------+----------------------
  Reporter: Paul McClellan <paulm@…> | Owner: pbristow
      Type: Bugs | Status: assigned
 Milestone: Boost 1.55.0 | Component: math
   Version: Boost 1.54.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------------+----------------------

Comment (by Paul McClellan <paulm@…>):

 I have wrappers around boost:

 {{{

 #include <boost/math/distributions/logistic.hpp>

 double logistic_pdf( double dX, double dL, double dS )
 {
         // logistic distribution object:
         boost::math::logistic logis(dL, dS);
         return pdf(logis, dX);
 }

 double logistic_utp( double dX, double dL, double dS )
 {
         // logistic distribution object:
         boost::math::logistic logis(dL, dS);
         return cdf(complement(logis, dX));
 }

 }}}


 These test cases should error, but return 0.0:


 {{{
 logistic_pdf(Pc_PosInf, Pc_PosInf, 1.0);
 logistic_pdf(Pc_PosInf, 0.0, Pc_PosInf);
 logistic_pdf(Pc_PosInf, 0.0, 0.0);

 logistic_utp(Pc_PosInf, Pc_PosInf, 1.0);
 logistic_utp(Pc_PosInf, 0.0, Pc_PosInf);
 logistic_utp(Pc_PosInf, 0.0, 0.0);

 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9126#comment:3>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC