10 October 2012 10:50:22 PM
VANDERMONDE_APPROX_1D_TEST:
C++ version
Test the VANDERMONDE_APPROX_1D library.
The R8LIB library is needed.
The QR_SOLVE library is needed.
The test needs the CONDITION library.
The test needs the TEST_INTERP libary.
TEST01:
Approximate data from TEST_INTERP problem #1
Number of data points = 18
Using polynomial approximant of degree 0
L2 data approximation error = 0.392837
Normalized length of piecewise linear interpolant = 3.13553
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #1
Number of data points = 18
Using polynomial approximant of degree 1
L2 data approximation error = 0.350074
Normalized length of piecewise linear interpolant = 3.13553
Normalized length of polynomial interpolant = 1.08357
TEST01:
Approximate data from TEST_INTERP problem #1
Number of data points = 18
Using polynomial approximant of degree 2
L2 data approximation error = 0.344057
Normalized length of piecewise linear interpolant = 3.13553
Normalized length of polynomial interpolant = 1.12211
TEST01:
Approximate data from TEST_INTERP problem #1
Number of data points = 18
Using polynomial approximant of degree 3
L2 data approximation error = 0.332868
Normalized length of piecewise linear interpolant = 3.13553
Normalized length of polynomial interpolant = 1.31026
TEST01:
Approximate data from TEST_INTERP problem #1
Number of data points = 18
Using polynomial approximant of degree 4
L2 data approximation error = 0.199123
Normalized length of piecewise linear interpolant = 3.13553
Normalized length of polynomial interpolant = 2.51647
TEST01:
Approximate data from TEST_INTERP problem #1
Number of data points = 18
Using polynomial approximant of degree 5
L2 data approximation error = 0.190907
Normalized length of piecewise linear interpolant = 3.13553
Normalized length of polynomial interpolant = 2.60932
TEST01:
Approximate data from TEST_INTERP problem #1
Number of data points = 18
Using polynomial approximant of degree 9
L2 data approximation error = 0.0613776
Normalized length of piecewise linear interpolant = 3.13553
Normalized length of polynomial interpolant = 3.22044
TEST01:
Approximate data from TEST_INTERP problem #1
Number of data points = 18
Using polynomial approximant of degree 12
L2 data approximation error = 0.0374634
Normalized length of piecewise linear interpolant = 3.13553
Normalized length of polynomial interpolant = 3.37935
TEST01:
Approximate data from TEST_INTERP problem #2
Number of data points = 18
Using polynomial approximant of degree 0
L2 data approximation error = 2.58162
Normalized length of piecewise linear interpolant = 2.66086
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #2
Number of data points = 18
Using polynomial approximant of degree 1
L2 data approximation error = 2.58162
Normalized length of piecewise linear interpolant = 2.66086
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #2
Number of data points = 18
Using polynomial approximant of degree 2
L2 data approximation error = 1.80946
Normalized length of piecewise linear interpolant = 2.66086
Normalized length of polynomial interpolant = 1.88131
TEST01:
Approximate data from TEST_INTERP problem #2
Number of data points = 18
Using polynomial approximant of degree 3
L2 data approximation error = 1.80946
Normalized length of piecewise linear interpolant = 2.66086
Normalized length of polynomial interpolant = 1.88131
TEST01:
Approximate data from TEST_INTERP problem #2
Number of data points = 18
Using polynomial approximant of degree 4
L2 data approximation error = 1.76341
Normalized length of piecewise linear interpolant = 2.66086
Normalized length of polynomial interpolant = 1.90124
TEST01:
Approximate data from TEST_INTERP problem #2
Number of data points = 18
Using polynomial approximant of degree 5
L2 data approximation error = 1.76341
Normalized length of piecewise linear interpolant = 2.66086
Normalized length of polynomial interpolant = 1.90124
TEST01:
Approximate data from TEST_INTERP problem #2
Number of data points = 18
Using polynomial approximant of degree 9
L2 data approximation error = 1.30404
Normalized length of piecewise linear interpolant = 2.66086
Normalized length of polynomial interpolant = 8.90486
TEST01:
Approximate data from TEST_INTERP problem #2
Number of data points = 18
Using polynomial approximant of degree 12
L2 data approximation error = 0.89436
Normalized length of piecewise linear interpolant = 2.66086
Normalized length of polynomial interpolant = 7153.58
TEST01:
Approximate data from TEST_INTERP problem #3
Number of data points = 11
Using polynomial approximant of degree 0
L2 data approximation error = 7.87737
Normalized length of piecewise linear interpolant = 1.68472
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #3
Number of data points = 11
Using polynomial approximant of degree 1
L2 data approximation error = 4.4679
Normalized length of piecewise linear interpolant = 1.68472
Normalized length of polynomial interpolant = 1.28026
TEST01:
Approximate data from TEST_INTERP problem #3
Number of data points = 11
Using polynomial approximant of degree 2
L2 data approximation error = 2.59431
Normalized length of piecewise linear interpolant = 1.68472
Normalized length of polynomial interpolant = 1.48631
TEST01:
Approximate data from TEST_INTERP problem #3
Number of data points = 11
Using polynomial approximant of degree 3
L2 data approximation error = 1.74627
Normalized length of piecewise linear interpolant = 1.68472
Normalized length of polynomial interpolant = 1.58943
TEST01:
Approximate data from TEST_INTERP problem #3
Number of data points = 11
Using polynomial approximant of degree 4
L2 data approximation error = 1.68297
Normalized length of piecewise linear interpolant = 1.68472
Normalized length of polynomial interpolant = 1.61226
TEST01:
Approximate data from TEST_INTERP problem #3
Number of data points = 11
Using polynomial approximant of degree 5
L2 data approximation error = 1.66663
Normalized length of piecewise linear interpolant = 1.68472
Normalized length of polynomial interpolant = 1.59507
TEST01:
Approximate data from TEST_INTERP problem #3
Number of data points = 11
Using polynomial approximant of degree 9
L2 data approximation error = 0.328589
Normalized length of piecewise linear interpolant = 1.68472
Normalized length of polynomial interpolant = 3.28924
TEST01:
Approximate data from TEST_INTERP problem #3
Number of data points = 11
Using polynomial approximant of degree 12
L2 data approximation error = 3.24433e-10
Normalized length of piecewise linear interpolant = 1.68472
Normalized length of polynomial interpolant = 3.88345
TEST01:
Approximate data from TEST_INTERP problem #4
Number of data points = 8
Using polynomial approximant of degree 0
L2 data approximation error = 0.149984
Normalized length of piecewise linear interpolant = 3.25908
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #4
Number of data points = 8
Using polynomial approximant of degree 1
L2 data approximation error = 0.146011
Normalized length of piecewise linear interpolant = 3.25908
Normalized length of polynomial interpolant = 1.02803
TEST01:
Approximate data from TEST_INTERP problem #4
Number of data points = 8
Using polynomial approximant of degree 2
L2 data approximation error = 0.14598
Normalized length of piecewise linear interpolant = 3.25908
Normalized length of polynomial interpolant = 1.03194
TEST01:
Approximate data from TEST_INTERP problem #4
Number of data points = 8
Using polynomial approximant of degree 3
L2 data approximation error = 0.0559589
Normalized length of piecewise linear interpolant = 3.25908
Normalized length of polynomial interpolant = 3.3304
TEST01:
Approximate data from TEST_INTERP problem #4
Number of data points = 8
Using polynomial approximant of degree 4
L2 data approximation error = 0.0559577
Normalized length of piecewise linear interpolant = 3.25908
Normalized length of polynomial interpolant = 3.32957
TEST01:
Approximate data from TEST_INTERP problem #4
Number of data points = 8
Using polynomial approximant of degree 5
L2 data approximation error = 0.00829484
Normalized length of piecewise linear interpolant = 3.25908
Normalized length of polynomial interpolant = 3.58478
TEST01:
Approximate data from TEST_INTERP problem #4
Number of data points = 8
Using polynomial approximant of degree 9
L2 data approximation error = 1.10123e-14
Normalized length of piecewise linear interpolant = 3.25908
Normalized length of polynomial interpolant = 4.81669
TEST01:
Approximate data from TEST_INTERP problem #4
Number of data points = 8
Using polynomial approximant of degree 12
L2 data approximation error = 6.51592e-15
Normalized length of piecewise linear interpolant = 3.25908
Normalized length of polynomial interpolant = 4.89584
TEST01:
Approximate data from TEST_INTERP problem #5
Number of data points = 9
Using polynomial approximant of degree 0
L2 data approximation error = 0.143324
Normalized length of piecewise linear interpolant = 3.2218
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #5
Number of data points = 9
Using polynomial approximant of degree 1
L2 data approximation error = 0.143322
Normalized length of piecewise linear interpolant = 3.2218
Normalized length of polynomial interpolant = 1.00003
TEST01:
Approximate data from TEST_INTERP problem #5
Number of data points = 9
Using polynomial approximant of degree 2
L2 data approximation error = 0.13517
Normalized length of piecewise linear interpolant = 3.2218
Normalized length of polynomial interpolant = 1.31038
TEST01:
Approximate data from TEST_INTERP problem #5
Number of data points = 9
Using polynomial approximant of degree 3
L2 data approximation error = 0.0717904
Normalized length of piecewise linear interpolant = 3.2218
Normalized length of polynomial interpolant = 3.05546
TEST01:
Approximate data from TEST_INTERP problem #5
Number of data points = 9
Using polynomial approximant of degree 4
L2 data approximation error = 0.0391096
Normalized length of piecewise linear interpolant = 3.2218
Normalized length of polynomial interpolant = 3.42544
TEST01:
Approximate data from TEST_INTERP problem #5
Number of data points = 9
Using polynomial approximant of degree 5
L2 data approximation error = 0.03589
Normalized length of piecewise linear interpolant = 3.2218
Normalized length of polynomial interpolant = 3.41454
TEST01:
Approximate data from TEST_INTERP problem #5
Number of data points = 9
Using polynomial approximant of degree 9
L2 data approximation error = 1.99908e-12
Normalized length of piecewise linear interpolant = 3.2218
Normalized length of polynomial interpolant = 47.9536
TEST01:
Approximate data from TEST_INTERP problem #5
Number of data points = 9
Using polynomial approximant of degree 12
L2 data approximation error = 6.15052e-13
Normalized length of piecewise linear interpolant = 3.2218
Normalized length of polynomial interpolant = 125.388
TEST01:
Approximate data from TEST_INTERP problem #6
Number of data points = 49
Using polynomial approximant of degree 0
L2 data approximation error = 0.0530251
Normalized length of piecewise linear interpolant = 2.68209
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #6
Number of data points = 49
Using polynomial approximant of degree 1
L2 data approximation error = 0.0525121
Normalized length of piecewise linear interpolant = 2.68209
Normalized length of polynomial interpolant = 1.0062
TEST01:
Approximate data from TEST_INTERP problem #6
Number of data points = 49
Using polynomial approximant of degree 2
L2 data approximation error = 0.0473605
Normalized length of piecewise linear interpolant = 2.68209
Normalized length of polynomial interpolant = 1.2402
TEST01:
Approximate data from TEST_INTERP problem #6
Number of data points = 49
Using polynomial approximant of degree 3
L2 data approximation error = 0.0437687
Normalized length of piecewise linear interpolant = 2.68209
Normalized length of polynomial interpolant = 1.43902
TEST01:
Approximate data from TEST_INTERP problem #6
Number of data points = 49
Using polynomial approximant of degree 4
L2 data approximation error = 0.0424429
Normalized length of piecewise linear interpolant = 2.68209
Normalized length of polynomial interpolant = 1.51608
TEST01:
Approximate data from TEST_INTERP problem #6
Number of data points = 49
Using polynomial approximant of degree 5
L2 data approximation error = 0.0363054
Normalized length of piecewise linear interpolant = 2.68209
Normalized length of polynomial interpolant = 1.97702
TEST01:
Approximate data from TEST_INTERP problem #6
Number of data points = 49
Using polynomial approximant of degree 9
L2 data approximation error = 0.0272317
Normalized length of piecewise linear interpolant = 2.68209
Normalized length of polynomial interpolant = 2.51535
TEST01:
Approximate data from TEST_INTERP problem #6
Number of data points = 49
Using polynomial approximant of degree 12
L2 data approximation error = 0.0187621
Normalized length of piecewise linear interpolant = 2.68209
Normalized length of polynomial interpolant = 2.95898
TEST01:
Approximate data from TEST_INTERP problem #7
Number of data points = 4
Using polynomial approximant of degree 0
L2 data approximation error = 0.25
Normalized length of piecewise linear interpolant = 2.63961
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #7
Number of data points = 4
Using polynomial approximant of degree 1
L2 data approximation error = 0.25
Normalized length of piecewise linear interpolant = 2.63961
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #7
Number of data points = 4
Using polynomial approximant of degree 2
L2 data approximation error = 5.90092e-16
Normalized length of piecewise linear interpolant = 2.63961
Normalized length of polynomial interpolant = 3.36731
TEST01:
Approximate data from TEST_INTERP problem #7
Number of data points = 4
Using polynomial approximant of degree 3
L2 data approximation error = 2.35514e-16
Normalized length of piecewise linear interpolant = 2.63961
Normalized length of polynomial interpolant = 3.36731
TEST01:
Approximate data from TEST_INTERP problem #7
Number of data points = 4
Using polynomial approximant of degree 4
L2 data approximation error = 1.01829e-15
Normalized length of piecewise linear interpolant = 2.63961
Normalized length of polynomial interpolant = 3.58258
TEST01:
Approximate data from TEST_INTERP problem #7
Number of data points = 4
Using polynomial approximant of degree 5
L2 data approximation error = 1.29235e-15
Normalized length of piecewise linear interpolant = 2.63961
Normalized length of polynomial interpolant = 3.90825
TEST01:
Approximate data from TEST_INTERP problem #7
Number of data points = 4
Using polynomial approximant of degree 9
L2 data approximation error = 5.34437e-15
Normalized length of piecewise linear interpolant = 2.63961
Normalized length of polynomial interpolant = 6.52763
TEST01:
Approximate data from TEST_INTERP problem #7
Number of data points = 4
Using polynomial approximant of degree 12
L2 data approximation error = 2.16022e-14
Normalized length of piecewise linear interpolant = 2.63961
Normalized length of polynomial interpolant = 10.4248
TEST01:
Approximate data from TEST_INTERP problem #8
Number of data points = 12
Using polynomial approximant of degree 0
L2 data approximation error = 0.101554
Normalized length of piecewise linear interpolant = 2.31939
Normalized length of polynomial interpolant = 1
TEST01:
Approximate data from TEST_INTERP problem #8
Number of data points = 12
Using polynomial approximant of degree 1
L2 data approximation error = 0.101522
Normalized length of piecewise linear interpolant = 2.31939
Normalized length of polynomial interpolant = 1.00042
TEST01:
Approximate data from TEST_INTERP problem #8
Number of data points = 12
Using polynomial approximant of degree 2
L2 data approximation error = 0.000762201
Normalized length of piecewise linear interpolant = 2.31939
Normalized length of polynomial interpolant = 2.31944
TEST01:
Approximate data from TEST_INTERP problem #8
Number of data points = 12
Using polynomial approximant of degree 3
L2 data approximation error = 0.000748027
Normalized length of piecewise linear interpolant = 2.31939
Normalized length of polynomial interpolant = 2.31959
TEST01:
Approximate data from TEST_INTERP problem #8
Number of data points = 12
Using polynomial approximant of degree 4
L2 data approximation error = 0.000731706
Normalized length of piecewise linear interpolant = 2.31939
Normalized length of polynomial interpolant = 2.32028
TEST01:
Approximate data from TEST_INTERP problem #8
Number of data points = 12
Using polynomial approximant of degree 5
L2 data approximation error = 0.000704364
Normalized length of piecewise linear interpolant = 2.31939
Normalized length of polynomial interpolant = 2.32052
TEST01:
Approximate data from TEST_INTERP problem #8
Number of data points = 12
Using polynomial approximant of degree 9
L2 data approximation error = 0.000627667
Normalized length of piecewise linear interpolant = 2.31939
Normalized length of polynomial interpolant = 2.32096
TEST01:
Approximate data from TEST_INTERP problem #8
Number of data points = 12
Using polynomial approximant of degree 12
L2 data approximation error = 2.14845e-11
Normalized length of piecewise linear interpolant = 2.31939
Normalized length of polynomial interpolant = 23167
VANDERMONDE_APPROX_1D_TEST:
Normal end of execution.
10 October 2012 10:50:22 PM