numeric
numeric copied to clipboard
Singular case not handled
For some inputs to eig solver the QR francis results in an error. See failing example below
const matrix = [
[0, 0, 1, 0],
[0, 0, 0, 1],
[-1.0000000000000002, -0, -0, -0],
[-0, -1.0000000000000002, -0, -0],
]
const result = numeric.eig(matrix)
Results in internal error: eig: internal error thrown at https://github.com/sloisel/numeric/blob/master/src/numeric.js#L1361
Solvability in wolframalpha: https://www.wolframalpha.com/input/?i=eigenvalue++%5B+%5B0,+0,+1,+0%5D,+%5B0,+0,+0,+1%5D,+%5B-1.0000000000000002,+-0,+-0,+-0%5D,+%5B-0,+-1.0000000000000002,+-0,+-0%5D%5D