Repository navigation
3.8.2
A correctness fix. Upgrade.
- A leading minus now negates only the first term. Since the grammar's first release, a sign
at the start of an expression applied to the whole sum:-1 - 1evaluated to0,-x + yto
-(x + y), and-2*x - 3to-2x + 3. It now reads as written everywhere an expression is
parsed — the REPL, the browser,Parser.parse, function arguments, equations and inequalities.
solve(-x + 1 = 0, x)answersx = 1(it answeredx = -1), andsolve(-x^2 + 4 > 0, x)
answers-2 < x < 2(it answeredfalse). An expression with a single leading term —-x,
-3k,-(a + b),-2^2— parses exactly as before.
Saved sessions and share links can change meaning, and that includes ones Leonardo wrote.
A line such asf := -x + yin a:saved script or a shared link was evaluated wrongly by
every earlier release and is evaluated correctly by this one. The library's own output was
affected too: a sum beginning with a negative number — whichsimplify,consolidateand the
exact tier can produce — prints as(-3.0 + x), and earlier releases read that back as
-(3 + x). Re-check any result computed from such a line.
Binary compatibility. Both artifacts are binary-compatible with 3.8.1; MiMa finds no change.