(p, mean, stdev)
| 87098 | |
| 87099 | |
| 87100 | function quantileNormal(p, mean, stdev) { |
| 87101 | if (p < 0 || p > 1) return NaN; |
| 87102 | return (mean || 0) + (stdev == null ? 1 : stdev) * _constants.SQRT2 * erfinv(2 * p - 1); |
| 87103 | } // Approximate inverse error function. Implementation from "Approximating |
| 87104 | // the erfinv function" by Mike Giles, GPU Computing Gems, volume 2, 2010. |
| 87105 | // Ported from Apache Commons Math, http://www.apache.org/licenses/LICENSE-2.0 |
| 87106 |