Opened 5 years ago

Closed 4 years ago

#13254 closed Bugs (obsolete)

extreme value distribution's mean/std fail for location=0

Reported by: anonymous Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.66.0 Severity: Problem
Keywords: Cc:

Description

Extreme value distribution's mean and standard_deviation use both detail::check_scale for location parameter a, which seems wrong, as there's no limitation for location parameter a (besides being finite).

This causes even a standard extreme value distribution to fail:

BOOST_AUTO_TEST_CASE(checkScaleIssueMean)
{
	boost::math::extreme_value_distribution<> G;

	boost::math::mean(G);
}

BOOST_AUTO_TEST_CASE(checkScaleIssueStd)
{
	boost::math::extreme_value_distribution<> G;

	boost::math::standard_deviation(G);
}

with

std::domain_error: Error in function boost::math::mean(const extreme_value_distribution<double>&): Scale parameter is 0, but must be > 0 !

std::domain_error: Error in function boost::math::standard_deviation(const extreme_value_distribution<double>&): Scale parameter is 0, but must be > 0 !

Change History (1)

comment:1 by John Maddock, 4 years ago

Resolution: obsolete
Status: newclosed
Note: See TracTickets for help on using tickets.