]> gitweb.michael.orlitzky.com - octave.d.git/commitdiff
tests/preconditioned_conjugate_gradient_method_tests.m: output diff
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 7 Apr 2026 18:53:06 +0000 (14:53 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 7 Apr 2026 18:53:06 +0000 (14:53 -0400)
Temporarily output the diff between the actual and expected results.

tests/preconditioned_conjugate_gradient_method_tests.m

index d0189de3ca75c399d4f8234041dcd5887701194a..7342ca82cb2d058bb7e0bb3017d04901c7ef46c7 100644 (file)
@@ -89,7 +89,7 @@ for n = [ 5, 10, 25, 50, 100 ]
                                                    max_iterations);
 
   diff = norm(o_x - x, 'inf');
-  msg = sprintf("Our PCGM agrees with Octave's, n=%d.", n);
+  msg = sprintf("Our PCGM agrees with Octave's, n=%d, diff=%.12f", n, diff);
   ## There's no good way to choose the tolerance here, since each
   ## individual algorithm terminates based on the (2,infinity)-norm of
   ## the gradient. So we use two orders of magnitude.