![]() |
eFinancialPlanner
V1.0 (proof of concept)
Personal Financial Planning based on Maslowian Portfolio Theory
|
Go to the source code of this file.
Macros | |
| #define | LOW 0.02425 |
| #define | HIGH 0.97575 |
Functions | |
| template<class type > | |
| type | norminv (type p) |
| template<class type > | |
| type | phi (type x) |
| float | fast_erfinv (float x) |
| double | erfinv (double x) |
Variables | |
| static const double | a [] |
| static const double | b [] |
| static const double | c [] |
| static const double | d [] |
| #define HIGH 0.97575 |
Definition at line 72 of file normdist.h.
| #define LOW 0.02425 |
norminv(x)
Lower tail quantile for standard normal distribution function.
This function returns an approximation of the inverse cumulative standard normal distribution function. I.e., given P, it returns an approximation to the X satisfying P = Pr{Z <= X} where Z is a random variable from the standard normal distribution.
The algorithm uses a minimax approximation by rational functions and the result has a relative error whose absolute value is less than 1.15e-9.
Author: Peter John Acklam Time-stamp: 2002-06-09 18:45:44 +0200 E-mail: jacklam@math.uio.no WWW URL: https://www.math.uio.no/~jacklam
C implementation adapted from Peter's Perl version by Philippe De Brouwer and re-written as a function template (in stead over function overloading as this results in more compact code)
note:
Definition at line 71 of file normdist.h.
| double erfinv | ( | double | x | ) |
erfinv
calculates the inverse error function. Uses fast_erfinv and performs a two steps of Newton-Raphson correction to achieve full accuracy.
Definition at line 182 of file normdist.h.
|
inline |
fast_erfinv
calculates the inverse error function (correct up to 6 digits)
Definition at line 154 of file normdist.h.
| type norminv | ( | type | p | ) |
Definition at line 73 of file normdist.h.
| type phi | ( | type | x | ) |
Phi(x)
calculates the inverse comulative normal distribution note: - requires <cmath>
Definition at line 123 of file normdist.h.
|
static |
Coefficients in rational approximations. needed for norminv()
Definition at line 5 of file normdist.h.
|
static |
Definition at line 15 of file normdist.h.
|
static |
Definition at line 24 of file normdist.h.
|
static |
Definition at line 34 of file normdist.h.