Doing inverse cdf solver using bisection method