The tests for matrix_square_root that I recently added do not compile under GCC 3.4 and 4.0 on Gael's computer. It's not clear to me what the problem is as I don't have access to this compiler, but the first error message is "call of overloaded 'sqrt(const std::complex<float>&)' is ambiguous" ( http://eigen.tuxfamily.org/CDash/viewBuildError.php?buildid=6106 ). The possibilities are the sqrt() in ComplexSchur.h and the sqrt() in the standard library.
I wonder whether we need the sqrt() function in ComplexSchur.h. The one in the standard library is presumably perfectly fine, handles complex numbers and puts the branch cut in the same place as our own sqrt() function. I'd guess that whatever implementation which our implementation is based on, had to include its own square root function for complex numbers because it's not in the standard library (for FORTRAN?); we then simply copied the implementation without realizing that we could rely on the C++ standard library.
Does anybody remember the reason behind the Eigen::internal::sqrt() function in ComplexSchur comes from? It was added in the revision which introduced the complex eigensolver. Can we remove it?
I think you can safely remove it ;)
Done (changeset 29b3545f6f33).
-- GitLab Migration Automatic Message --
This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/264.