Opened 10 years ago

Closed 10 years ago

#6939 closed Bugs (fixed)

pdf(weibull(shape, scale), 0) == 0 even if shape <= 1

Reported by: Florian Schoppmann <Florian.Schoppmann@…> Owned by: John Maddock
Milestone: Boost 1.51.0 Component: math
Version: Boost 1.49.0 Severity: Problem
Keywords: Cc: pbristow@…

Description

If shape == 1, then we should have pdf(weibull(shape, scale), 0) == 1 and if shape < 1, cdf(weibull(shape, scale), 0) should call raise_overflow_error.

Example:

#include <boost/math/distributions/weibull.hpp>
using namespace boost::math;
int main() {
    std::cout << pdf(weibull(0.5), 0) << std::endl
     << pdf(weibull(1), 0) << std::endl;
}

This prints:

0
0

Change History (2)

comment:1 by John Maddock, 10 years ago

Cc: pbristow@… added
Milestone: To Be DeterminedBoost 1.51.0
Status: newassigned

comment:2 by John Maddock, 10 years ago

Resolution: fixed
Status: assignedclosed

(In [78723]) Tighten Weibull distro tests. Fix corner cases in Weibull distro. Fixes #6939. Fixes #6938.

Note: See TracTickets for help on using tickets.