NormalDistribution bug
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
JQuantLib |
New
|
Undecided
|
Unassigned |
Bug Description
Hi,
Currently the NormalDistribution class member probability density function always return the probability of N(0,1). i.e. the standardized one, instead of N(average, sigma).
The function could return the correct N(average, sigma) after fixing the following 2 lines in jquantlib/
public double op(final double x) /* @ReadOnly */ {
// final double exponent = -0.5*x*x;
if (exponent <= -690.0) return 0.0;
// return Constants.
Thanks.
Felix