264
2011-05-11 15:03:15 +0000
[GCC3.4/4.0] Eigen::internal::sqrt() in ComplexSchur.h clashes with std::sqrt()
2019-12-04 10:43:29 +0000
1
1
1
Unclassified
Eigen
Eigenvalues
3.0
All
All
RESOLVED
FIXED
---
Unknown
---
1
jitseniesen
eigen.nobody
gael.guennebaud
jacob.benoit.1
jitseniesen
oldest_to_newest
1082
0
jitseniesen
2011-05-11 15:03:15 +0000
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?
1083
1
gael.guennebaud
2011-05-11 22:23:53 +0000
I think you can safely remove it ;)
1095
2
jitseniesen
2011-05-12 17:53:44 +0000
Done (changeset 29b3545f6f33).
8708
3
eigen.nobody
2019-12-04 10:43:29 +0000
-- 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.