26#ifndef quantlib_normal_distribution_hpp
27#define quantlib_normal_distribution_hpp
29#include <ql/math/errorfunction.hpp>
30#include <ql/errors.hpp>
164 #ifdef REFINE_TO_FULL_MACHINE_PRECISION_USING_HALLEYS_METHOD
166 const Real r = (
f_(z) - x) * M_SQRT2 * M_SQRTPI * exp(0.5 * z*z);
180 #if defined(QL_PATCH_SOLARIS)
336 : average_(average), sigma_(sigma) {
339 "sigma must be greater than 0.0 ("
340 <<
sigma_ <<
" not allowed)");
351 return exponent <= -690.0 ? 0.0 :
361 : average_(average), sigma_(sigma) {
364 "sigma must be greater than 0.0 ("
365 <<
sigma_ <<
" not allowed)");
375 : average_(average), sigma_(sigma) {
378 "sigma must be greater than 0.0 ("
379 <<
sigma_ <<
" not allowed)");
384 : average_(average), sigma_(sigma) {
387 "sigma must be greater than 0.0 ("
388 <<
sigma_ <<
" not allowed)");
Cumulative normal distribution function.
CumulativeNormalDistribution(Real average=0.0, Real sigma=1.0)
Real derivative(Real x) const
Real operator()(Real x) const
ErrorFunction errorFunction_
NormalDistribution gaussian_
QL_DEPRECATED typedef Real argument_type
QL_DEPRECATED typedef Real result_type
Inverse cumulative normal distribution function.
static Real tail_value(Real x)
Real operator()(Real x) const
InverseCumulativeNormal(Real average=0.0, Real sigma=1.0)
static const CumulativeNormalDistribution f_
QL_DEPRECATED typedef Real argument_type
QL_DEPRECATED typedef Real result_type
static Real standard_value(Real x)
static const Real x_high_
Maddock's cumulative normal distribution class.
Real operator()(Real x) const
QL_DEPRECATED typedef Real argument_type
QL_DEPRECATED typedef Real result_type
Maddock's Inverse cumulative normal distribution class.
Real operator()(Real x) const
QL_DEPRECATED typedef Real argument_type
QL_DEPRECATED typedef Real result_type
Moro Inverse cumulative normal distribution class.
Real operator()(Real x) const
QL_DEPRECATED typedef Real argument_type
QL_DEPRECATED typedef Real result_type
MoroInverseCumulativeNormal(Real average=0.0, Real sigma=1.0)
Normal distribution function.
Real derivative(Real x) const
NormalDistribution(Real average=0.0, Real sigma=1.0)
Real operator()(Real x) const
Real derNormalizationFactor_
Real normalizationFactor_
QL_DEPRECATED typedef Real argument_type
QL_DEPRECATED typedef Real result_type
InverseCumulativeNormal InvCumulativeNormalDistribution
NormalDistribution GaussianDistribution