Re: [julia-users] Type stability of eig

2014-01-29 Thread Andreas Noack Jensen
The main problem is that it cannot really be determined before whether the eigen solution is real or complex before the calculation is over in contrast to the `sqrt` case. I think it would be a little annoying to get a complex result from a symmetric matrix. Like if julia sqrt(4.0) 2.0 + 0.0im

Re: [julia-users] Type stability of eig

2014-01-29 Thread Milan Bouchet-Valat
Le mercredi 29 janvier 2014 à 13:42 +0100, Andreas Noack Jensen a écrit : The main problem is that it cannot really be determined before whether the eigen solution is real or complex before the calculation is over in contrast to the `sqrt` case. I think it would be a little annoying to get a

Re: [julia-users] Type stability of eig

2014-01-29 Thread Andreas Noack Jensen
There is a way to do that already. If you know that A is symmetric, you can do eigfact(Symmetric(A)), bypass the check for symmetry and go directly to the symmetric solver. This method should of course always return a real result so the alternative solution is: let eigfact(StridedMatrix) always

Re: [julia-users] Type stability of eig

2014-01-28 Thread John Myles White
How much worse would performance be if we “upgraded” all results to complex matrices? — John On Jan 28, 2014, at 8:38 PM, Jiahao Chen jia...@mit.edu wrote: The reason is primarily for performance and secondarily for numerical stability. eig() on a Matrix implements a polyalgorithm depending