This folder contains the software used for the numerical experiments performed in the manuscript:

    Bini, Fasi, & Iannazzo, Computing matrix functions associated with a Hermitian–definite pencil.

To compute the reference solution in higher precision, the code uses the Advanpix Multiprecision Computing Toolbox, if available, and falls back to the variable precision arithmetic (VPA) in the Symbolic Math Toolbox, otherwise. If neither toolbox is available, an error is thrown.

If the variable advpx is already defined in the workspace, then local_configuration.m does not run the automatic detection and keeps that existing value. This lets the user override the backend choice explicitly. If advpx is not defined, the code auto-detects Advanpix first and then VPA.

The directory contains the following MATLAB files.

test_all.m 
   % The script performs 3 tests.
   % a) Errors, with n constant and cond variable (test_kind = 0,1,2).
   % b) Errors, with n variable and cond constant (test_kind = 0,1,2,3).
   % c) CPU times.
   % Test a) generates Figure 2; Test b) generates Figure 1; test c) generates Figure 3.

test_accuracy_cond.m
   % Function that performs test a).

test_accuracy_size.m 
   % Function that performs test b).

test_performance.m
   % Function that performs test c).

local_configuration.m
   % Script that sets high-precision implementation, plotting parameters, and the default output directory.

generate.m
   % Function that generate random test matrices.

condafa1b.m
   % Function that computes the condition number of Af(A\B).

dd.m
   % Auxiliary function used by condafa1b.

algorithms/
   % This directory contains the following functions:
   %   algorithm1.m,
   %   algorithm2.m,
   %   algorithm3.m, and
   %   algorithm4.m.
   % These correspond to the algorithms in the paper.

Results/
   % Default output directory for generated .pdf and .dat files.
   % The tests write their figures and data to this directory by default.
   % This directory contains:
   %   the .pdf files with the figures generated by the tests; and
   %   the .dat files containing the data used for plotting the same figures.
   % The manuscript uses TikZ to plot the data in the .dat files.
