Wed Oct 8 08:24:59 2025 llsq_test(): python version: 3.10.12 numpy version: 1.26.4 Test llsq(). llsq_test01(): llsq() computes the formula for a line of the form y = A * x + B which minimizes the RMS error to a set of N data values. Estimated relationship is y = 62.148 * x + -40.5076 Expected value is y = 61.272 * x - 39.062 I X Y B+A*X |error| 0 1.470000 52.210000 50.849933 -1.360067 1 1.500000 54.120000 52.714372 -1.405628 2 1.520000 54.480000 53.957332 -0.522668 3 1.550000 55.840000 55.821771 -0.018229 4 1.570000 56.200000 57.064730 0.864730 5 1.600000 56.570000 58.929169 2.359169 6 1.630000 59.930000 60.793609 0.863609 7 1.650000 61.290000 62.036568 0.746568 8 1.680000 63.110000 63.901007 0.791007 9 1.700000 66.470000 65.143967 -1.326033 10 1.730000 66.280000 67.008406 0.728406 11 1.750000 67.100000 68.251365 1.151365 12 1.780000 70.920000 70.115804 -0.804196 13 1.800000 72.190000 71.358764 -0.831236 14 1.830000 74.460000 73.223203 -1.236797 RMS error = 1.12022 Graphics saved as "llsq_data.png" Graphics saved as "llsq_approx.png" Repeat calculation, using np.linalg.lstsq(): Estimated relationship is y = 62.148 * x + -40.5076 llsq_test02(): llsq0() computes the formula for a line of the form y = A * x which minimizes the RMS error to a set of N data values. Estimated relationship is y = 0.641657 * x I X Y A*X |error| 0 0.000000 0.000000 0.000000 0.000000 1 0.100000 0.086500 0.064166 -0.022334 2 0.150000 0.101500 0.096249 -0.005251 3 0.200000 0.110600 0.128331 0.017731 4 0.250000 0.127900 0.160414 0.032514 5 0.300000 0.189200 0.192497 0.003297 6 0.350000 0.269500 0.224580 -0.044920 7 0.400000 0.288800 0.256663 -0.032137 8 0.450000 0.242500 0.288746 0.046246 9 0.500000 0.346500 0.320828 -0.025672 10 0.550000 0.322500 0.352911 0.030411 11 0.600000 0.376400 0.384994 0.008594 12 0.650000 0.426300 0.417077 -0.009223 13 0.700000 0.456200 0.449160 -0.007040 RMS error = 0.0251999 Graphics saved as "llsq_test02.png" llsq_test() Normal end of execution. Wed Oct 8 08:25:00 2025