2
0
mirror of https://github.com/boostorg/math.git synced 2026-02-20 14:52:17 +00:00

Add logpdf to inverse gamma distribution

[ci skip]
This commit is contained in:
Matt Borland
2022-02-24 13:08:50 +01:00
parent 208a1bef46
commit 570b40e14a
2 changed files with 41 additions and 0 deletions

View File

@@ -72,6 +72,9 @@ void test_spot(
BOOST_CHECK_CLOSE_FRACTION( // Compare to naive formula (might be less accurate).
pdf(dist, x), naive_pdf(dist.shape(), dist.scale(), x), tol);
BOOST_CHECK_CLOSE_FRACTION( // Compare direct logpdf to naive log(pdf())
logpdf(dist, x), log(pdf(dist,x)), tol);
BOOST_CHECK_CLOSE_FRACTION( // Compare to expected CDF.
cdf(dist, x), P, tol);