31 Real power = std::pow (1. + x*x /
n_, 0.5 * (
n_ + 1));
33 return g1 / (g2 * power * std::sqrt (
M_PI *
n_));
38 Real sig = (x > 0 ? 1.0 : - 1.0);
45 QL_REQUIRE (
y >= 0 &&
y <= 1,
"argument out of range [0, 1]");
52 x -= (
f_(x) -
y) /
d_(x);
59 <<
" reached in InverseCumulativeStudent, "
60 <<
"y=" <<
y <<
", x=" << x);
Beta and beta incomplete functions.
Real operator()(Real x) const
Real logValue(Real x) const
Real operator()(Real x) const
CumulativeStudentDistribution f_
Real operator()(Real x) const
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
std::size_t Size
size of a container
Real incompleteBetaFunction(Real a, Real b, Real x, Real accuracy, Integer maxIteration)
Incomplete Beta function.
Student's t-distribution.