Answer the question
In order to leave comments, you need to log in
Why does JS calculate inaccurately?
I found a script for calculating the determinant of a matrix: http://mathhelpplanet.com/static.php...nad-matritsami
We need to calculate the determinant of such a matrix:
var M = new Array();
M[0] = new Array(-2.3128860264714093, -1.1564430132357046, 0, 254.417462911855);
M[1] = new Array(-1.1564430132357046, -2.3128860264714097, 254.417462911855, -9.769962616701378*Math.pow(0.1,14));
M[2] = new Array(10.876222279050648, -5.572421139525324, 59.09640000000007, -3559.6051520867136);
M[3] = new Array(-5.572421139525324, 10.876222279050648, -3559.6051520867136, 59.09640000000007);
Answer the question
In order to leave comments, you need to log in
This is called numerical instability, one of the most common problems in computing.
The solution is to use ready-made linear algebra libraries, where people have already solved these problems for you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question