# Black-Scholes formula producing a negative number for a Call Option

I would expect that the Black Scholes model should always give a value for a call option, $c$, to be at least $0$. However, I am seeing some cases where that is not the case. Here is the Black-Scholes model for a call option.
\begin{eqnarray*} c &=& S_0 N(d_1) - Ke^{-rT}N(d_2) \\ d_1 &=& \frac{ \ln{ \frac{S_0}{K} } - (r + \frac{\sigma^2}{2})T }{\sigma \sqrt{T}} \\ d_2 &=& d_1 - \sigma \sqrt{T} \\ \end{eqnarray*} Now please consider the special case of $\sigma = 0.1$, $T = 1$, $r = 0$ and $K = 2S_0$. We have: \begin{eqnarray*} c &=& S_0 N(d_1) - Ke^{-(0)(1)}N(d_2) = S_0 N(d_1) - 2S_0N(d_2) \\ d_1 &=& \frac{ \ln{( \frac{S_0}{2S_0} )} - (0 + \frac{\sigma^2}{2})(1) }{\sigma \sqrt{1}} \\ d_1 &=& \frac{ \ln{( \frac{1}{2} )} - (0 + \frac{\sigma^2}{2})(1) }{ 0.1 } \\ d_1 &=& 10 \ln{( \frac{1}{2} )} - 10\Big( \frac{.01}{2} \Big) \\ d_1 &=& 10 \ln{( \frac{1}{2} )} - \frac{.1}{2} \\ d_1 &=& -6.9814718 \\ N(d_1) &=& 0.000000000001461 \\ d_2 &=& -6.9814718 - 0.01 \sqrt{1} = -6.9914718 \\ N(d_2) &=& 0.000000000001360 \\ c &=& S_0 (0.000000000001461) - 2S_0 (0.000000000001360) \\ c &=& (-1.259E-12) S_0 \\ \end{eqnarray*} Why am I getting a negative number? Is it round off error?
Thanks,
Bob

Your $d_1$ is wrong - the minus sign is wrong. It should be: $$d_1 = (\ln(S_0/K) + \sigma^2/2)/\sigma.$$ See e.g. here.