* fix qr and sign edge cases
qr() was throwing an error if the pivots of a matrix were zero.
This commit fixes that and ensures that the results are consistant
with wolfram alpha.
Whilst doing this I found a bug in complex.js, I have added a work
around but we should flag this upstream.
I also addressed the long standing concerns about assert statements
within the body of the qr function.
Fixes#1669Fixes#942
* further improvements to qr and sign
mainly fixing things I got wrong in previous commit
* add array test
* fix: remove only from tests and disallow
Uses mochas `--forbid-only` flag as advised by
https://github.com/standard/standard/issues/988
* Allow taking means of quantities with units.
* Fix silly error in test.
The test as written did not test anything about units.
* Fix same error again...
* Implemented the `multicombinations` function
* Write unit tests for `multicombinations` function
* Integrate the `multicombinations` function throughout codebase
1. Include multicombinations factory function in factoriesAny.js and factoriesNumber.js
2. Write embedded docs for multicombinations
3. Added latex support
4. Refer to multicombinations in the "see also"-section of related functions
* Change name from `multichoose` to `combinationsWithRep`
* Update combinationsWithRep.js
Instead of always cancelling `n-1 factorial` from the denominator and ignoring `k factorial`, added a conditional to cancel the the larger of the two, therefore further reducing redundant calculations.
* Revert "Update combinationsWithRep.js"
This reverts commit efef6d3bd4c381aa12f00869a7624a622268805c.
* Update combinationsWithRep.js
Instead of always cancelling `n-1 factorial` from the denominator and ignoring `k factorial`, added a conditional to cancel the the larger of the two, therefore further reducing redundant calculations.
* Add one more test for the case: k > n-1
* Refactor single for-loop into two separate ones
Mathjs latex uses same syntax as template literals, thus we need to
ignore some otherwise helpful rules that look for template literal
syntax in normal strings.
* Implemented the `multicombinations` function
* Write unit tests for `multicombinations` function
* Integrate the `multicombinations` function throughout codebase
1. Include multicombinations factory function in factoriesAny.js and factoriesNumber.js
2. Write embedded docs for multicombinations
3. Added latex support
4. Refer to multicombinations in the "see also"-section of related functions
* Change name from `multichoose` to `combinationsWithRep`