Repository navigation
This release is about answers that hold at every scale. A value below about 1e-50 read as 0 in most of
the special functions, the trigonometric functions of a non-real number, the modulus of a decimal and a decimal
literal. Two constants were equal when they differed by less than 1e-16. And the solvers judged a root, a
residual or a coefficient against a fixed 1e-16 or 1e-7 rather than against the equation's own size. So
(sin(x) - x) * 10^12 = 0 had one root where sin(x) = x has nine, x^2 - 10^(-8) x = 0 lost its root
10^(-8), and sinh(10^(-60)) was 0. Each of these is now decided by the size of what it is about.
Many were found by solving each equation again scaled by 10^±12 to 10^±30 and asking whether the answer
scaled with it.
The solver also answers more equations exactly:
- an exponential equal to a line, by the Lambert W function;
- a sum of arctangents, by taking the tangent;
- an equation between two inverse trigonometric functions, by their squares;
- a polynomial with non-real coefficients, through its product with its conjugate;
- an equation in a factorial or the gamma function, by its whole roots and the equation for the rest.
No tier of the Math OS roadmap is completed by this
release (see the note on #746). Its work is on tier 1, a symbolic engine worth building on, which asks for
complete and right answers.
Every changed answer is in BREAKING-CHANGES.md
under 2.9.0 — since 2.8.0, with the old value, the new one and why. Read it first if your code depends on
an answer. It holds 42 entries, and almost all of them are silent changes, where the call still succeeds and
returns something else. The section opens with what to read first:
- A set of another type.
x + x! = x^3is{ 5 } \/ { x : x + x! = x ^ 3 and not x = 5 }, where it was a
FiniteSetof 13 decimals that missed real roots. An equation in a factorial orgammahas infinitely many
roots, so no finite set is its answer (#2538). - Throwing and returning.
MathS.ParseandEntity.TryParsereturn a refused call where they threw
(#2498).norm(v)andbeta(x)with one argument
throwFunctionArgumentCountException, where they parsed as the productsnorm * vandbeta * x
(#2182). - Silent:
10^(-20) = 2 * 10^(-20)isFalse, where it wasTrue. Two constants are equal only when their
difference is zero. - Silent: a small value is the value.
erfc(12)is1.356…E-64andgamma(-60.5)is-4.843…E-83, where
both were0, and"1.0E-51"parses as itself. - Silent:
arcoshandarsechtake their principal values.arcosh(-2)is1.317… + πi, where it was
-1.317… + πi, and the printed form of both changes everywhere.
AssemblyVersion stays 2.0.0.0. The recorded public surface is the same as 2.8.0's, with no additions and no
removals, so code that compiled against 2.8.0 still compiles, and code bound against it still binds.
Wrong answers fixed
Each item has an entry in BREAKING-CHANGES.md with both values.
- Equations at another scale.
- An equation multiplied by a number judged its roots against the product:
(sin(x) - x) * 10^12 = 0was
{ 0 }, and(x * (2 - 4x + 2x^2)^(1/3) - 2) * 10^(-12) = 0had five roots, two of them not roots.
Both now have the roots of the equation before it was multiplied. - A polynomial whose roots are all small was answered with numbers that are not its roots: the five
answers tox^5 - 3*10^(-120) x + 10^(-150) = 0were near4.7e-24, and its roots are10^(-30)times
those ofx^5 - 3x + 1. - A root smaller than
1e-7was rounded onto 0:x^2 - 10^(-8) x = 0was{ 0 }, and is
{ 0, 1/100000000 }. - A rational root was searched for only among rationals of the coefficients' own scale. An equation with a
modulus lost roots, and one inconjorImwas left unsolved, when its unknown was scaled. x - 10^(-17) * x^0 = 0was{ }: the exact root's condition was decided by rounding.
- An equation multiplied by a number judged its roots against the product:
- Equations that were answered wrongly at any scale.
- An exponential equal to a line was answered by Newton's method with decimals:
e^x = 2xover the reals
was a pair of non-real numbers, where it has no real root.e^x = x + 2is
union({ -lambertw(n, (-1) / e ^ 2) + -2 }, n in ZZ). x^6 - i x^5 - i x - 1 = 0, which is(x - i)(x^5 - i), was 17 numbers, 13 of them within1e-6of
i. It is its five distinct roots, with the double rootionce.arcsin(-2x) = arccos(3x + 2)had one of its two roots.sqrt(x) + x = cos(sqrt(x)) - 1was{ }: the equation was raised to clear a radical the rest of it
still held (#2495). Its root 0, where the
radicand is zero, is found beside Newton's, andsin(sqrt(x)) = xhas it too.- A polynomial with a candidate root that fails it is left unsolved, where it was answered with wrong or
missing roots. sin(x)/x = 0 and x in [-10; 10]was left as an intersection with a family, and is its six roots
(#2502).x + x! = x^3and2^x = x^2were each short of a root inside Newton's own search box. The first is
answered as above. The second, and every real equation like it, now has the conjugate of each non-real
root it finds (#2546).
- An exponential equal to a line was answered by Newton's method with decimals:
- Values.
sin(pi/6 + 10^(-20))simplified to1/2: the table of exact values matched an argument within an
absolute tolerance. A table value is only for its own argument.zeta,polygamma,gamma,erfc,erfi,lambertw,Ei,li,Si,Ci,Shi,Chi,sinh,
tanh,cot,arcsin,arccos,arctan, andsin,cos,tanandlnof a non-real number each
dropped a value or a part below about1e-50, andabs(2.08E-52)was0.conj(1/12345678901)was a 100-digit decimal, and is1/12345678901.arcoshof a number with a negative real part came out negated.
- Integrals. An antiderivative of a small integrand was accepted when its derivative missed the integrand
by less than1e-16:10^(-12) x sqrt(sin(x)^2)was given one whose derivative is not the integrand. - The MCP server.
am_verify_equalsaidx / 10^9and2 x / 10^9are equal, andam_check_steps
accepted the step between them.
Equations solved exactly
arctan(x) + arctan(2x) = pi/4is{ (-3 + sqrt(17)) / 4 }, where it was a decimal.arcsin(x) = arccos(x)is{ 1/2 * sqrt(2) }.sqrt(2) ln(x) + sqrt(2) ln(x + 1) = 0is{ (-1 + sqrt(5)) / 2 }, and a sum of logarithms or arctangents
times a large number, which threwOverflowException, is solved as the sum.x! = 24is{ 4 } \/ { x : x! = 24 and not x = 4 }, where it was left unsolved.sum((sqrt(2) * 10^(-20))^n, n, 0, +oo)is summed, where a ratio that small was taken for 0.
Other changes
- A Gröbner basis computation is bounded by 20,000 steps by default, and no longer by a 60-second clock as well. The clock
timed work between steps that the budget did not charge, and on a slow runner it discarded a computation that had
finished in 175 steps (#2544).
Speed
Measured as a pair: d2eaa257, the 3003rd commit and v2.8.0 itself, beside 8987b77d, the 3051st and
2.9.0's last kernel change (#2548). Both were measured twice, interleaved, in one run on one CI runner
(version_performance_control.md,
#2550).
Allocation: no benchmark moved by 1%. The largest moves are SolveHard −0.97%, SimplifyHard −0.92% and
SolveEasyMedium +0.76%.
Timing: no benchmark moved beyond the spread between its own two measurements, except ParseEasy at +2.9%.
Its allocation is the same to the byte in all four measurements, so that is read as the runner.
Packages
- NuGet:
AngouriMath,AngouriMath.FSharp,AngouriMath.InteractiveandAngouriMath.Terminal, published
through NuGet trusted publishing. amcli: the Terminal's archives for Windows, macOS and Linux and its.debfor amd64, arm64 and arm are
attached below. The AUR package still waits on
#1660.
Checked in CI
DocSamples now compares each website sample's output with the block its page says it prints, where it
checked only that the sample ran (#2492, #2493).
The Kernel Benchmark Across Key Commits keeps a measurement for every place in its list, so a commit named twice
is measured twice (#2488, #2494).
Known issues
P - Q sqrt(2)atn = 160is still answered wrongly bySolveEquation: its residual is near1e-123,
past the hundred digits evaluation works to. Decided for v3
(#2448,
#1019).- Newton's method is the solver's last resort, and its answer is a finite set that can be short of roots of a
transcendental equation. Decided for v3
(#2545,
#1019 item 11). +ooand-ooare members ofRRandCC. Decided for v3
(#2220).1/(1/x)simplifies tox, which has a value atx = 0, where the input has none. Decided for v3
(#1648,
#2134 row 1).3 iparses as3^i(#1503), anda != b
asa! = b(#1225).(3+4i)^2000evaluates to+oo + +ooi, and(3+4i)^2000 / (3+4i)^1999toNaN.- Under the real codomain, the roots of polynomial and trigonometric equations are not filtered:
x^2 = -1gives{ i, -i }, andsin(x) = 2the familyarcsin(2) + 2 pi n.
Pull requests in this release
50 PRs, listed by number below: the 48 merged in v2.8.0..8987b77d8, #2549 and #2550.
Workspace, process, CI and release preparation, with no change to the shipped code: #2491, #2493, #2494, #2549,
#2550.
2491 2493 2494 2496 2497 2499 2500 2503 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516
2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2532 2533 2534 2535 2536 2537
2539 2540 2541 2542 2543 2544 2547 2548 2549 2550