Felipe Jiménez Wed, 22 Jul 2015 06:17:04 -0700
Guess you could also do mysqrt{T<:Real}(x::T) = x>=0 ? sqrt(x) : sqrt(x+0im)
but it will be slower.