RalphAS / GenericSchur.jl

Julia package for Schur decomposition of matrices with generic element types
Other
26 stars 4 forks source link

Lyapunov and Sylvester equation solvers for BigFloat and DoubleFloats #9

Closed andreasvarga closed 1 year ago

andreasvarga commented 1 year ago

I am pondering to propose a roadmap for the extension of the MatrixEquations package to address the solution of Lyapunov, Sylvester and even Riccati equations for data types not covered by LAPACK (e.g., BigFloat, DoubleFloats). In the matrix equation solvers a central role is played by the Schur decomposition of the involved matrices or matrix pairs, both real and complex. In MatrixEquations , schur(A) and schur(A,B) are used for all element types covered by BlasReal and BlasComplex types. I wonder if I could entirely rely on the GenericSchur package to cover the required functionality for extended precision data types.

RalphAS commented 1 year ago

Since this is almost all translated from LAPACK, it should be reliable, and I've done substantial testing for higher precision. I am confident of the standard schur(A) and related functionality. (With the caveat that I have certainly not done a complete study of underflow/overflow, just what is in the basic LAPACK test suite.) The generalized schur(A,B) etc. has had less testing, but I'm not aware of problems. For DoubleFloats you may need to consider scaling to avoid underflow/overflow since they are not IEEE-compliant. In any case, if you find the package inadequate, please file issues.

andreasvarga commented 1 year ago

Is the generalized Schur decomposition for real matrices in your plan?

andreasvarga commented 1 year ago

I performed the first tests with updated Lyapunov solvers, which now support arbitrary floating point matrices. Surprisingly, the changes were minimal, so probably I will continue to modify all solvers. For the generalized Lyapunov equations with real matrices, I used conversions to complex data and removing the imaginary parts in the resulting solution. During my tests I discovered that the DoubleFloat multiplication is not commutative #161. Is this a known fact?

andreasvarga commented 1 year ago

I finished the transition to a generic set of solvers for linear matrix equations. I encountered no problems with the used software from GenericSchur. Many thanks for providing these extensions. I even adapted some software from your work to my purposes. The MatrixEquations software is ready to use the real generalized Schur decomposition if it will be available sometime. For now, I am relying on the complex decomposition. FYI: I implemented several Sylvester equation and Sylvester system solvers for the real case (albeit without scaling), which could be of interest also for you.