A stock's log-price follows a driftless Brownian motion with volatility sigma, starting at 0. A barrier option knocks in if the log-price reaches the level a > 0 at any time in [0, T]. Compute the probability that the option knocks in.
Three numbers sigma, a and T, each with at most 6 digits after the decimal point.
One real number: the knock-in probability, with relative error at most 1e-9. Note that the probability can be extremely small; your output must be relatively accurate, not just close to zero.
0.01 <= sigma <= 5
0.001 <= a <= 20
0.001 <= T <= 30
a <= 30 * sigma * sqrt(T)
This is a standard problem: a submission scores full points if it produces the correct output for every test case, and zero otherwise.
Numeric answers are accepted if they are within a relative tolerance of 1e-09 of the expected value.
0.2 0.1 1
6.170750774519738e-01
0.3 0.6 4
3.173105078629141e-01