Find the inverse of spanning_probability by use of the bisection method.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(in) | :: | x | The value of spanning_probability for which the inverse is calculated. |
||
integer, | intent(in) | :: | L | Size of the system. |
||
integer, | intent(in) | :: | num_samples | Number of Monte Carlo samples to use when evaluating spanning_probability. |
||
real(kind=dp), | intent(in) | :: | tolerance | Tolerance of approximation. The return value is within tolerance/2 of the correct (but numerical) value. |
The inverse of spanning_probability. If spanning_probability is denoted \(\Pi(p,L)\), this function returns \(p\) such that \(\Pi(p,L)=x\).