User:Mfasi: Difference between revisions

Jump to navigation Jump to search
Line 60: Line 60:


== Your task ==
== Your task ==
* The project I would like to work on is '''Improve logm, sqrtm, funm'''.
The project I would like to work on is the one called '''Improve logm, sqrtm, funm'''. Basically, I would like to provide Octave with an (almost) state of the art library to compute the most diffused matrix functions in a robust way. Octave's standard library as well as the linear algebra package (Octave Forge) already implement some of these functions, notably funm (), expm (), logm() and sqrtm(). Some of these implementations are good, while others should be improved or, in some cases, completely rewritten.
 
Basically, I would like to provide Octave with an (almost) state of the art library to compute the most diffused matrix functions in a robust way. Octave's standard library as well as the linear algebra package (Octave Forge) already implement some of these functions, notably funm (), expm (), logm() and sqrtm(). Some of these implementations are good, while others should be improved or, in some cases, completely rewritten.


One of the functions that should be completely reimplemented is probably funm (), that currently uses a simple but in some cases weak approach inspired by the definition of matrix function via the Jordan canonical form. This approach fails when the matrix is not diagonalizable and can be very inaccurate when the eigenvectors are ill-conditioned. To avoid these issues I would like to use the Schur-Parlett recurrence with block reordering, a well known algorithm that though having some issues that should be addressed, is theoretically robust. This implementation will require to:
One of the functions that should be completely reimplemented is probably funm (), that currently uses a simple but in some cases weak approach inspired by the definition of matrix function via the Jordan canonical form. This approach fails when the matrix is not diagonalizable and can be very inaccurate when the eigenvectors are ill-conditioned. To avoid these issues I would like to use the Schur-Parlett recurrence with block reordering, a well known algorithm that though having some issues that should be addressed, is theoretically robust. This implementation will require to:
Line 74: Line 72:


The hyperbolic and trigonometric functions have already been written down straightforwardly in thfm (), from the linear-algebra package. As it relies on sqrtm (), expm () and logm (), it will benefit of all the improvements to such functions.
The hyperbolic and trigonometric functions have already been written down straightforwardly in thfm (), from the linear-algebra package. As it relies on sqrtm (), expm () and logm (), it will benefit of all the improvements to such functions.
The choice of the test cases is not so trivial. For the funm () function, I think that could be worth testing the Schur-Parlett approach on exp (), log () and root(), as a comparison can be directly made with their matrix counterparts already present in Octave's core library. A few special functions should be tested too, and I would like to use the Bessel functions, the Dawson function and the Lambert one. For the expm () functions some of the test cases should address the values the Padé approximants are ill-conditioned for, to check whether the devised heuristic is effective and wether the new approach makes the implementation actually more robust. As logm () and rootm () are multivalued complex functions, the


==== Tentative timeline ====
==== Tentative timeline ====
Line 83: Line 83:
* 30 May: Implementation of the auxiliary functions required for '''funm ()''' (see above)
* 30 May: Implementation of the auxiliary functions required for '''funm ()''' (see above)


* '''23 June''': Implementation of '''funm ()'''
* '''23 June''': Implementation of '''funm ()''' along with its test cases


* 31 July: Improvement of '''expm ()''' and '''logm ()''', implementation of '''rootm ()''' and check of the functionalities of '''thfm ()'''
* 31 July: Improvement of '''expm ()''' and '''logm ()''', implementation of '''rootm ()''' and check of the functionalities of '''thfm ()'''