|
1 | 1 | ### [Unreleased] |
2 | 2 |
|
3 | | -- **Stochastic equality check for expressions with unknowns**: `expr.isEqual()` |
4 | | - now uses a stochastic fallback when symbolic methods (expand + simplify) can't |
5 | | - prove equality. Both expressions are evaluated at 50 sample points (9 |
6 | | - well-known values + 41 random) and compared with relative+absolute tolerance, |
7 | | - including both real and imaginary parts. This detects equivalences like |
8 | | - `sin²(x) + cos²(x) = 1`, `(x+y)² = x²+2xy+y²`, and `sin(2x) = 2sin(x)cos(x)` |
9 | | - that were previously returned as `undefined`. Singularities (NaN at a sample |
10 | | - point) are skipped rather than treated as disagreements. The check also works |
11 | | - when the two expressions have different unknowns (e.g. `x - x + y` vs `y`). |
12 | | - |
13 | 3 | - **Non-strict parser supports exponents on bare functions**: In non-strict mode |
14 | | - (`strict: false`), bare function names like `sin`, `cos`, `tan` can now include |
15 | | - an exponent before the argument list. For example, `sin^2(x)` and `cos^{10}(x)` |
16 | | - are now correctly parsed as `["Power", ["Sin", "x"], 2]`, matching the behavior |
17 | | - of their LaTeX counterparts `\sin^2(x)` and `\cos^{10}(x)`. |
| 4 | + (`strict: false`), bare function names like `sin`, `cos`, `tan` can now |
| 5 | + include an exponent before the argument list. For example, `sin^2(x)` and |
| 6 | + `cos^{10}(x)` are now correctly parsed as `["Power", ["Sin", "x"], 2]`, |
| 7 | + matching the behavior of their LaTeX counterparts `\sin^2(x)` and |
| 8 | + `\cos^{10}(x)`. |
| 9 | + |
| 10 | +- **Unicode superscript and subscript digit support**: The LaTeX parser now |
| 11 | + recognizes Unicode superscript digits (`⁰¹²³⁴⁵⁶⁷⁸⁹⁻`) and subscript digits |
| 12 | + (`₀₁₂₃₄₅₆₇₈₉₋`), converting them to `^{...}` and `_{...}` respectively. |
| 13 | + This works in all parsing modes. For example, `x²` parses as `x^{2}`, |
| 14 | + `sin²(x)` as `\sin^{2}(x)`, `x⁻²` as `x^{-2}`, and `x₁₂` as `x_{12}`. |
18 | 15 |
|
19 | 16 | - **`.is()` now works with assigned variables**: Previously, `.is()` only |
20 | 17 | evaluated expressions made entirely of declared constants (like `Pi`). Now it |
|
0 commit comments