This repository contains the code used in the technical report:
A. Dmytryshyn, M. Fasi, N. J. Higham, and X. Liu. Mixed-precision algorithms for solving the Sylvester matrix equation, ArXiv preprint arXiv:2503.03456 [math NA], February 2025.
The code requires MATLAB R2022b or newer. To run the code, the following MATLAB toolboxes need to be installed:
These two dependencies are configured as submodules of this repository and, provided that git is available, they can be installed with:
$ git submodule update --init
On a system that supports make the MATLAB interface to CPFloat can be built with
$ cd deps/cpfloat; make mexmat; cd ../..
provided that MATLAB is installed and available on the search path.
The repository contains three subfolders:
deps/, which contains the dependencies above;methods/, which contains the subroutines required to reproduce the results; anddatfiles/, which contains the data generated by the main scripts.
Three main scripts are locate in the root directory:
startup.m, which adds the dependencies to the MATLAB path;test_conditioning.m, which generates Figure 1;plot_optk.m, which generates Figure 2;test_mixedprecision.m, which generates Figure 3; andrun_tests.m, which runs the four scripts above and generate all numerical results.
The following algorithms in the manuscript are implemented:
- Algorithm 3.1 is implemented in
methods/sylvester_mprec_gmresir2.m; - Algorithm 5.1 is implemented in
methods/sylvester_mprec_reorth.m; and - Algorithm 5.2 is implemented in
methods/sylvester_mprec_inv.m.
The data used to generate the figures in the manuscript can be generated running the MATLAB script:
>> run_tests
The work of Andrii Dmytryshyn is supported by the Swedish Research Council (VR) under grant 2021-05393.
This project is licensed under the terms of the BSD 2-Clause "Simplified" License (SPDX-License-Identifier: BSD-2-Clause).