you can just represent those as a pair of real numbers, one for the real part, and one for the imaginary part. As long as you only (recursively) apply exponential and trig functions on those numbers, I believe you'll stay within the realm of complex numbers.
0/0, tan(pi/2), log(0)
I was replying to the sqrt and log of negative numbers. For undefined functions, I'd throw an exception
True, but I thought this was about real arithmetic not complex arithmetic