XgCe[^ŕ\镡f[^xɏłuÖٓI}bsOv
uo}bsOvƂXNvgłB

 * ŏ@ŋߎȐ̊֐𐶐 math.least_square() ܂B
   Cӂ̎wł܂B
{{{
x = [1, 3, 5, 7, 9]
y = [3, 6, 5.5, 5, 7]
# generates: f(x) = 3.55 + 0.35 * x
f = math.least_square(x, y, 1)
# generates: g(x) = 2.94286 + 0.707143 * x - 0.0357143 * x ** 2
g = math.least_square(x, y, 2)
}}}
 * }gNXNX܂B}gNXƃXg̎lZA
   ыts̎Zoł܂BgṕA\[XfBNg
   test/test-matrix.az QƂB
{{{
>>> m = @@{{2, 3, 1}, {1, 1, 0}, {1, -1, -1}}
>>> minv = m.inverse()
@@{{1, -2, 1}, {-1, 3, -1}, {2, -5, 1}}
>>> m * minv
@@{{1, 0, 0}, {-1.11022e-16, 1, 0}, {0, 0, 1}}
>>> minv * [2, 3, 1]
[-3, 6, -10]
>>> m[0][1] = 99
>>> m
@@{{2, 99, 1}, {1, 1, 0}, {1, -1, -1}}
}}}
 * XgECe[^ɑ΂鑀֐𐮗܂B
 * `Pbg #22035, #21694 ܂B
