jiggzson / nerdamer

a symbolic math expression evaluator for javascript
http://www.nerdamer.com
MIT License
514 stars 82 forks source link

"Uncaught TypeError: Cannot read property '1' of undefined" on solveEquations #628

Closed sametaylak closed 2 years ago

sametaylak commented 3 years ago

Hey jiggzson, We have quite a strange bug that happens when we call solveEquations with given array.

nerdamer.solveEquations(["0=discount___plan / (45909438.9 + 0 + discount___plan)", "45909438.9=45909438.9 + 0 + discount___plan"])

output

Uncaught TypeError: Cannot read property '1' of undefined
    at Matrix.determinant (nerdamer.core.js:11382)
    at Object.solveSystem (Solve.js:725)
    at solveSystem (Solve.js:622)
    at Function.solve [as solveEquations] (Solve.js:1173)
    at <anonymous>:1:10
gunnarmein commented 3 years ago

Here is an easier repro: nerdamer.solveEquations(["a=1"])

jiggzson commented 3 years ago

@sametaylak, thanks. I'll looking into it. @gunnarmein, thanks for the easier repro.