Function: [L, U] = mpfr_matrix_mul_d (XL, YL, XU, YU)

Compute the matrix product with binary64 numbers and correctly rounded result.

Compute the lower and upper boundary of the matrix multiplication of interval matrices [XL, XU] and [YL, YU].

The result is guaranteed to be tight. That is, the matrix product is evaluated with (virtually) infinite precision and the exact result is approximated with binary64 numbers using directed rounding.

m = magic (3);
[l, u] = mpfr_matrix_mul_d (m, m', m + 1, m' + 1)
 ⇒ l = 
    101    71    53
     71    83    71
     53    71   101
   u = 
    134   104    86
    104   116   104
     86   104   134

See also: mtimes.

Demonstration 1

The following code

  processors = nproc ('overridable');

  A = vec (magic (2000));
  tic;
  for i = 1:processors
    mpfr_matrix_mul_d (A', A, A', A);
  endfor
  printf ('Time for %d vector dot products: %d seconds\n', processors, toc)

  B = repmat (A, 1, processors);
  tic;
  mpfr_matrix_mul_d (B', A, B', A);
  printf ('Time for %d vector dot products running in parallel: %d seconds\n', processors, toc)

Produces the following output

Time for 4 vector dot products: 5.99704 seconds
Time for 4 vector dot products running in parallel: 2.09878 seconds

Package: interval