mathjs
mathjs copied to clipboard
An extensive math library for JavaScript and Node.js
### Describe the bug `lgammaNumber` incorrectly returns `NaN` for all `n < 0`. ### To Reproduce 1. Call `mathjs.log(mathjs.gamma(-1.5))` and get `0.8600470153764809`. 2. Call `mathjs.lgamma(-1.5)` and get `NaN`. 3. See...
Am I missing something, or is it the case that there is no way to get the numerator and denominator of a Fraction in the mathjs expression language? For Complex...
**Describe the bug** A clear and concise description of what the bug is. I think sometimes Schur returns a matrix that isn't quasi upper triangular. **To Reproduce** Generic orthonormal matrices...
Nothing in the documentation for setDistinct implies anything about sorting the array/matrix, yet: ``` math.setDistinct([3, 1, 2]); // [1, 2, 3] math.setDistinct(['h', 'e', 'l', 'l', 'o']); // ['e', 'h', 'l',...
At the moment, the callback in a `forEach()` invocation is simply called and its return value is ignored. However, some operations one might execute using `forEach()`, especially those of the...
Recently, I have just been throwing any mathjs methods I create into the number bundle with their standard factories, on the theory that if their factory defines implementations for other...
Fixes #3563 Summary - Pure percent additions now behave arithmetically: 10% + 20% == 0.3. - Existing “relative percent” semantics on non-percent left-hand sides are preserved: 50 + 20% +...
I got an email from a Chinese user explaining that he has to switch the input from Chinese to English in order to type parenthesis in an expression. It would...
## Description This PR implements support for complex numbers in the `math.mod` function using Gaussian integer division semantics. ## Problem Solved Previously, `math.mod` would throw a TypeError when given complex...
Previously, gamma on BigNumbers only worked for positive integers. This change implements a general arbitrary-precision algorithm based on the Stirling series (reference included in the code), and adds tests for...