How can Erlang C values be greater than one?
You haven't said what event \$P\$ measures the probability of. 

But you'll notice that your formula gives \$P&gt;1\$ when \$A&gt;c\$.

So I'll guess \$P\$ is something like the probability of a collision on the network, or that a particular channel is occupied with other traffic when a subscriber attempts to connect, or something like that.

Then it would make sense that \$P=1\$ when \$A&gt;c\$ and the actual formula should be

$$P=\begin{cases}
{\rm your\ long\ formula}, &amp; 0 &lt; A &lt; c \\
1, &amp; A \ge c
\end{cases}.$$

Then the formula you used in your program doesn't represent the correct formula for \$P\$ for all choices of \$A\$ and \$c\$.