5 Commits

Author SHA1 Message Date
jun
3ee07078f0 Add comments 2025-03-21 00:51:29 +01:00
jun
c860a6ccfe Add 3x3 matrix inversion 2025-03-08 11:25:57 +01:00
jun
ae104919e0 Change linalg mat_inverse.
Still not sure whether it's better to calculate
rref[pivot_row][col] * (rref[row][pivot_col] / pivot_val) (option 1)
vs.
rref[pivot_row][col] * rref[row][pivot_col] / pivot_val   (option 2)

(i.e.  a * b / c vs. "a * (b/c))

in terms of floating point error.

But I think option 1 (current commit) is better, since the scale factor
(rref[row][pivot_col] / pivot_val) is always <= 1 here (I think).
2025-03-07 21:24:53 +01:00
jun
dac1d159b1 Fix linalg bugs 2025-03-07 16:06:45 +01:00
jun
9096a4f9c9 Add guf_nearly_zero/one 2025-03-07 13:42:28 +01:00