mathjs
mathjs copied to clipboard
An extensive math library for JavaScript and Node.js
**Describe the bug** When trying to parse the unit `lbf/(mile/h)^2` a SyntaxError is thrown. `SyntaxError: Unexpected "^" in "lbf/(mile/h)^2" at index 12` This is unexpected since the unit should be...
## Problem Currently, all of the logic for deciding how resolution works lives in the global `resolve` function. This means that it's impossible to change the resolution behaviour on custom...
This PR addresses [this issue](https://github.com/josdejong/mathjs/issues/1679) albeit in a slightly different way than was described. Instead of implementing `toObject` and `fromObject` I opted to instead: 1. Implement the `fromObject` function (which...
I can serialize and de-serialize an expression to JSON as shown here: https://mathjs.org/docs/core/serialization.html In my application the expression is part of a bigger JSON which is de-serialized at a higher...
Fixes #2286 by updating `MathJsStatic` in the type definitions to include a constructor for the `Unit` interface.
This is a fix to #1406 based on some of the discussion in #1435 that maintains compatibility with the current implementation. It adds several new wildcards for simplification rules according...
Hi there, I added these 3 functions: `schur`, `sylvester`, and `lyap`. Respectively, they perform a [real Schur decomposition](https://en.wikipedia.org/wiki/Schur_decomposition), solve a [Sylvester equation](https://en.wikipedia.org/wiki/Sylvester_equation) and a [continuous-time Lyapunov equation](https://en.wikipedia.org/wiki/Lyapunov_equation). I notice that...
Implementation of following requirements in https://github.com/infusion/Complex.js/pull/25: * z ^ Infinity === NaN * Infinity ^ z === Infinity if Im(z) === 0 and Re(z) > 0 * Infinity ^ z...
Advanced CAS systems let users define their own symbols and perform symbolic operations with them. [Example in Sympy.](https://docs.sympy.org/latest/tutorial/basic_operations.html) Since all math.js functions can operate on complex numbers (that means they...