Returns the square root of z. The real and imaginary parts of the result have the same sign as the imaginary part of z.
pub fn sqrt(z: anytype) Complex(@TypeOf(z.re, z.im))
pub fn sqrt(z: anytype) Complex(@TypeOf(z.re, z.im)) {
const T = @TypeOf(z.re, z.im);
return switch (T) {
f32 => sqrt32(z),
f64 => sqrt64(z),
else => @compileError("sqrt not implemented for " ++ @typeName(T)),
};
}