On Fri, 10 Jan 2020, Allin Cottrell wrote:
3) I'm not so sure about Sven's suggestion that (if I'm
understanding him
right) sqrt(M), for M a real matrix with some negative elements, should
return an appropriate complex matrix. It's clearly defensible, but it might
produce surprising/puzzling results in some cases so I think it requires
further discussion.
In the meantime, it's not difficult to get what you want in this
sort of case, if you know what you're doing. Example:
<hansl>
matrix B = {1,-4; -9,1}
print B
eval sqrt(complex(B,0))
</hansl>
<output>
B (2 x 2)
1 -4
-9 1
? eval sqrt(complex(B,0))
1 + 0i 0 + 2i
0 + 3i 1 + 0i
</output>
Allin