I am searching for a way to calculate the $z$-score for a given percentile $p$. I found this site doing such a calculation. They have given a formula for calculating $P(Z\leq z)$:
$$ \Phi(z) = P(Z \le z) = \int_{-\infty}^z \frac{1}{\sqrt{2\pi}}e^{\frac{-u^2}{2}}du $$
Now I have the value of $P(Z\leq z)$ and I tried solving it to find out $z$, but it was really complex to solve for $z$.
Is there any function in JAVA or PHP which can do this? Or is there any mathematical way in which we can solve for $z$? (I am considering hard-coding the $z$ table as my last choice because I would have to make some approximations in that case.)
EDIT
I forgot to mention this, the main problem I am trying to solve is to draw a random point from a normal distribution. I tried using inversecdf
function of Normal Distribution. Due to the generalized implementation of that function, it is taking lot of time.
Say I want to calculate the point at $0.75$ we can do that in a quick way by finding $z$-value at that point followed by a simple math $\bar{x}+\sigma\times z$. So I wanted to find some way to get $z$-score for a given percentile.