Skip to content

Commit

Permalink
Add test case.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzmaddock committed Sep 7, 2024
1 parent ba364f9 commit e8e8edd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ test-suite special_fun :
[ run git_issue_184.cpp ]
[ run git_issue_1137.cpp ]
[ run git_issue_1139.cpp ]
[ run git_issue_1175.cpp ]
[ run special_functions_test.cpp /boost/test//boost_unit_test_framework ]
[ run test_airy.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ]
[ run test_bessel_j.cpp test_instances//test_instances pch_light /boost/test//boost_unit_test_framework ]
Expand Down
25 changes: 25 additions & 0 deletions test/git_issue_1175.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// (C) Copyright Matt Borland 2023.
// Use, modification and distribution are subject to the
// Boost Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#include "math_unit_test.hpp"
#include <iostream>
#include <boost/math/distributions/beta.hpp>

using namespace std;
using boost::math::beta_distribution;

int main(int argc, char* argv[])
{
double a = 5.0;
double b = 5.0;
double p = 0.5;

beta_distribution<> dist(a, b);
double x = quantile(dist, p);

CHECK_ULP_CLOSE(x, 0.5, 2);

return boost::math::test::report_errors();
}

0 comments on commit e8e8edd

Please sign in to comment.