15 September 2021 3:23:19.783 PM SINE_TRANSFORM_TEST FORTRAN90 version. Test the SINE_TRANSFORM library. SINE_TRANSFORM_TEST01: SINE_TRANSFORM_DATA does a sine transform of data defined by a vector. Demonstrate that the transform is its own inverse. Let R be a random N vector. Let S be the transform of D. Let T be the transform of E. Then R and T will be equal. I R(I) S(I) T(I) 1 0.2184 1.157 0.2184 2 0.9563 0.7018 0.9563 3 0.8295 0.6282 0.8295 4 0.5617 -.1624 0.5617 5 0.4153 0.8179E-01 0.4153 6 0.6612E-01 -.3815 0.6612E-01 7 0.2576 0.1303 0.2576 8 0.1100 -.4521 0.1100 9 0.4383E-01 -.1092E-02 0.4383E-01 10 0.6340 0.1023E-02 0.6340 SINE_TRANSFORM_TEST02: SINE_TRANSFORM_FUNCTION does a sine transform of data defined by a function F(X) evaluated at equally spaced points in an interval [A,B]. Demonstrate that the transform is its own inverse. Let X(0:N+1) be N+2 equally spaced points in [A,B]. Let S be the transform of F(X(1:N)). Let F1 be the linear interpolant of (A,F(A)), (B,F(B)). Let F2 be the transform of S. Then F(X(1:N)) = F1(X(1:N)) + F2(1:N). I X(I) F(X(I)) S F1 F2 F1+F2 0 1.0000 0.9504 0.0000 0.9504 0.0000 0.9504 1 1.2000 1.4256 -1.1557 0.8554 0.5702 1.4256 2 1.4000 1.7472 4.2511 0.7603 0.9869 1.7472 3 1.6000 1.7640 -1.5885 0.6653 1.0987 1.7640 4 1.8000 1.3709 0.6875 0.5702 0.8006 1.3709 5 2.0000 0.5472 -0.3593 0.4752 0.0720 0.5472 6 2.2000 -0.6048 0.1997 0.3802 -0.9850 -0.6048 7 2.4000 -1.8216 -0.1175 0.2851 -2.1067 -1.8216 8 2.6000 -2.6400 0.0654 0.1901 -2.8301 -2.6400 9 2.8000 -2.3587 -0.0299 0.0950 -2.4538 -2.3587 10 3.0000 0.0000 0.0000 0.0000 0.0000 0.0000 SINE_TRANSFORM_TEST03: SINE_TRANSFORM_FUNCTION does a sine transform of data defined by a function F(X) evaluated at N equally spaced points in an interval [A,B]. SINE_TRANSFORM_INTERPOLANT evaluates the interpolant. The interpolant will be 0 at the 0th and (N+1)-th points. It equals the function at points 1 through N. In between, it can approximate smooth functions, and the approximation improves with N. I X(I) F(X(I)) S(I) 1 1.3000 1.6157 -134.0830 2 1.6000 1.7640 50.9253 3 1.9000 1.0098 -17.4326 4 2.2000 -0.6048 7.5250 5 2.5000 -2.3184 -3.8691 6 2.8000 -2.3587 2.1586 7 3.1000 2.3490 -1.2589 8 3.4000 16.4736 0.7047 9 3.7000 46.5696 -0.3198 I X F(X) FHAT(X) 1 1.0000 0.9504 0.9504 2 1.1500 1.3148 1.2816 3 1.3000 1.6157 1.6157 4 1.4500 1.7852 1.8207 5 1.6000 1.7640 1.7640 6 1.7500 1.5105 1.4712 7 1.9000 1.0098 1.0098 8 2.0500 0.2827 0.3287 9 2.2000 -0.6048 -0.6048 10 2.3500 -1.5329 -1.5898 11 2.5000 -2.3184 -2.3184 12 2.6500 -2.7059 -2.6298 13 2.8000 -2.3587 -2.3587 14 2.9500 -0.8494 -0.9617 15 3.1000 2.3490 2.3490 16 3.2500 7.8721 8.0621 17 3.4000 16.4736 16.4736 18 3.5500 29.0339 28.6364 19 3.7000 46.5696 46.5696 20 3.8500 70.2425 71.4652 21 4.0000 101.3688 101.3688 SINE_TRANSFORM_TEST04: SINE_TRANSFORM_FUNCTION does a sine transform of data defined by a function F(X) evaluated at N equally spaced points in an interval [A,B]. SINE_TRANSFORM_INTERPOLANT evaluates the interpolant. The interpolant will be 0 at the 0th and (N+1)-th points. It equals the function at points 1 through N. In between, it can approximate smooth functions, and the approximation improves with N. Expect exact agreement every 5th sample. 1 0.0000 16.0000 16.0000 2 0.0875 13.5345 12.1185 3 0.1750 7.4099 8.1443 4 0.2625 0.7185 4.0878 5 0.3500 -3.3748 0.1277 6 0.4375 -3.3871 -3.3871 7 0.5250 -0.2620 -6.0047 8 0.6125 3.3141 -7.2911 9 0.7000 4.6025 -6.9684 10 0.7875 2.4973 -5.0307 11 0.8750 -1.7980 -1.7980 12 0.9625 -5.5036 2.1124 13 1.0500 -5.9724 5.8956 14 1.1375 -2.3548 8.7278 15 1.2250 3.7753 9.9499 16 1.3125 9.2225 9.2225 17 1.4000 10.9479 6.6098 18 1.4875 7.7911 2.5710 19 1.5750 1.1342 -2.1395 20 1.6625 -5.8790 -6.6400 21 1.7500 -10.1153 -10.1153 22 1.8375 -10.1816 -11.9913 23 1.9250 -7.1113 -12.0493 24 2.0125 -3.6242 -10.4554 25 2.1000 -2.4129 -7.7027 26 2.1875 -4.4832 -4.4832 27 2.2750 -8.5358 -1.5229 28 2.3625 -11.7561 0.5791 29 2.4500 -11.5442 1.4721 30 2.5375 -7.1536 1.1110 31 2.6250 -0.2587 -0.2587 32 2.7125 5.9046 -2.1800 33 2.8000 8.3365 -4.1037 34 2.8875 5.9686 -5.5186 35 2.9750 0.2690 -6.0635 36 3.0625 -5.5972 -5.5972 37 3.1500 -8.5599 -4.2152 38 3.2375 -7.3467 -2.2114 39 3.3250 -3.1110 0.0009 40 3.4125 1.3669 1.9914 41 3.5000 3.4133 3.4133 42 3.5875 2.0948 4.0814 43 3.6750 -1.2211 4.0106 44 3.7625 -3.7108 3.4064 45 3.8500 -2.8430 2.6103 46 3.9375 2.0112 2.0112 47 4.0250 9.0716 1.9437 48 4.1125 15.0640 2.5953 49 4.2000 17.0369 3.9459 50 4.2875 14.0285 5.7563 51 4.3750 7.6109 7.6109 52 4.4625 0.9946 9.0086 53 4.5500 -2.7827 9.4842 54 4.6375 -2.5312 8.7296 55 4.7250 0.5232 6.6879 56 4.8125 3.5923 3.5923 57 4.9000 4.0775 -0.0640 58 4.9875 1.1742 -3.6235 59 5.0750 -3.6279 -6.4081 60 5.1625 -7.4443 -7.8774 61 5.2500 -7.7626 -7.7626 62 5.3375 -4.0227 -6.1426 63 5.4250 1.9356 -3.4387 64 5.5125 6.8412 -0.3285 65 5.6000 7.8254 2.4058 66 5.6875 4.0559 4.0559 67 5.7750 -2.7801 4.1514 68 5.8625 -9.4269 2.5683 69 5.9500 -12.8901 -0.4441 70 6.0375 -12.0812 -4.3235 71 6.1250 -8.3250 -8.3250 72 6.2125 -4.4520 -11.6869 73 6.3000 -3.0293 -13.7891 74 6.3875 -4.7867 -14.2657 75 6.4750 -8.1757 -13.0461 76 6.5625 -10.3216 -10.3216 77 6.6500 -8.8046 -6.4529 78 6.7375 -3.2076 -1.8526 79 6.8250 4.4986 3.1225 80 6.9125 10.9780 8.2361 81 7.0000 13.3791 13.3791 SINE_TRANSFORM_TEST Normal end of execution. 15 September 2021 3:23:19.783 PM