mirror of
https://github.com/josdejong/mathjs.git
synced 2025-12-08 19:46:04 +00:00
* Adds Matrix function math.sqrtm(A) The current implementation is based on the Babylonian iterative method * Removing default parameter as they are only supported from ES6/ES2015 onwards * Increases the robustness of the `math.sqrtm()` Babylonian iterative method * Adds Denman–Beavers iteration method to compute `X*X = A` The Babylonian method is numerically unstable and more likely to fail to converge. For that reason, the Denman–Beavers iteration method is the one being used in the current version. * Adds LaTeX for math.sqrtm(A) * Updates `math.sqrtm(A)` suggestions list * Forgot to require latex... * Adds unit tests for `math.pow(math.sqrtm(A), 2) == A` * Switches from SyntaxError to Error Edits error message * Adds unit tests for non-square matrices and LaTeX conversion * Changes according to feedback - Removes Babylonian method implementation; - Adds unit tests for BigNumber matrices - sqrtm.test.js refactoring - Edits LaTeX conversion * Ensures input/output type persistence * Changes math.deepEqual to assert.deepEqual (or to approx.deepEqual where appropriate) * Fixes BigNumber unit test