Subject: [Boost-bugs] [Boost C++ Libraries] #6151: Wrong output from boot::math, cdf(complement(laplace_distribuiton<>(...))
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-11-19 21:41:51
#6151: Wrong output from boot::math, cdf(complement(laplace_distribuiton<>(...))
---------------------------------------+------------------------------------
Reporter: Yan Zhou <zhouyan@â¦> | Owner:
Type: Bugs | Status: new
Milestone: To Be Determined | Component: None
Version: Boost 1.48.0 | Severity: Problem
Keywords: |
---------------------------------------+------------------------------------
To illustrate the bug, see the following code,
{{{
#include <boost/math/distributions/laplace.hpp>
#include <iostream>
int main ()
{
boost::math::laplace lap(1, 1);
std::cout << boost::math::cdf(lap, 1) << std::endl;
std::cout << boost::math::cdf(boost::math::complement(lap, 1)) <<
std::endl;
return 0;
}
}}}
The output should be two numbers sum up to 1. Instead, it print
0.5 (this is correct)
0.0676676 (this is wrong)
I have double read the boost::math documents, to make sure that I didn't
misused the library. Hopefully I am not making a stupid mistake here.
Otherwise, the bug looks so stupid to me that I still don't believe this
is a bug in boost::math, instead I did something wrong here.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6151> 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:07 UTC