|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r58197 - sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma
From: erwann.rogard_at_[hidden]
Date: 2009-12-06 15:06:57
Author: e_r
Date: 2009-12-06 15:06:57 EST (Sun, 06 Dec 2009)
New Revision: 58197
URL: http://svn.boost.org/trac/boost/changeset/58197
Log:
m
Text files modified:
sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/derivative_log_unnormalized_pdf.hpp | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Modified: sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/derivative_log_unnormalized_pdf.hpp
==============================================================================
--- sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/derivative_log_unnormalized_pdf.hpp (original)
+++ sandbox/statistics/distribution_toolkit/boost/statistics/detail/distribution_toolkit/distributions/gamma/derivative_log_unnormalized_pdf.hpp 2009-12-06 15:06:57 EST (Sun, 06 Dec 2009)
@@ -9,6 +9,7 @@
#ifndef BOOST_STATISTICS_DETAIL_DISTRIBUTION_TOOLKIT_GAMMA_DERIVATIVE_LOG_UNNORMALIZED_PDF_HPP_ER_2009
#define BOOST_STATISTICS_DETAIL_DISTRIBUTION_TOOLKIT_GAMMA_DERIVATIVE_LOG_UNNORMALIZED_PDF_HPP_ER_2009
#include <cmath>
+#include <limits>
#include <boost/math/distributions/gamma.hpp>
#include <boost/math/policies/policy.hpp>
@@ -39,7 +40,7 @@
if(x == 0)
{
// TODO see log_unnormalized_pdf
- return static_cast<T>(1/0);
+ return std::numeric_limits<T>::infinity();
}
static T one_ = static_cast<T>(1);
result = (shape - one_) / x - one_ / scale;
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