Base on the unit circle, I know
$ \begin{align} &\cot\left(\frac{\pi}{2}\right) \\ =&\frac{0}{1}\\ =&0 \end{align} $
But it is also
$ \begin{align} &\cot\left(\frac{\pi}{2}\right) \\ =&\frac{1}{\tan\left(\frac{\pi}{2}\right)}\\ =&\frac{1}{\frac{1}{0}}\\ =&undefined \end{align} $
And Google gives me this answer:
$6.12303177 × 10^{-17}$
I am really confused now. Although I know it is $0$, I don't see why the other ones are wrong.