diff --git a/src/content/quickstart/index.html b/src/content/quickstart/index.html index 5ff93f5ced..01a9223964 100644 --- a/src/content/quickstart/index.html +++ b/src/content/quickstart/index.html @@ -39,12 +39,14 @@

Install for F#

dotnet add package AngouriMath.FSharp

- The current release is 2.7.0, and every 2.x release changes answers that earlier versions + The current release is 2.8.0, and every 2.x release changes answers that earlier versions got wrong. Whichever version you are coming from, read - BREAKING-CHANGES.md + BREAKING-CHANGES.md first: it lists every input whose result is now different, with the old value and the new one, - under a heading per release. 2.7.0 is a drop-in replacement for 2.6.0 — the assembly version is - pinned at 2.0.0.0 for the whole of 2.x. + under a heading per release. 2.8.0 is not a drop-in replacement for 2.7.0: a solver's answer can now + be an indexed union, and some names read differently, so read the list of what to read first under + 2.8.0 — since 2.7.0 before upgrading. The assembly version is pinned at + 2.0.0.0 for the whole of 2.x.

The library targets netstandard2.0, net8.0 and net10.0. diff --git a/src/content/whatsnew/index.html b/src/content/whatsnew/index.html index 7d1bbb4a3d..73ee1eb978 100644 --- a/src/content/whatsnew/index.html +++ b/src/content/whatsnew/index.html @@ -33,8 +33,92 @@

What's new

} COPY AND PASTE FOR A NEW BLOCK --> - -
2.7.0 + +
2.8.0 +

+ A release about answers that are complete and answers that do not depend on where they were asked. + Over the complex numbers an equation with infinitely many roots is now answered with all of them, as a + family indexed by the whole numbers: e^x = 2 was { ln(2) }, a finite set that + claims to be every root, and is union({ ln(2) + 2 * pi * i * n }, n in ZZ). Of 24 equations + whose roots were listed and searched for numerically, 17 had incomplete answers on master just before + this change, and none do now. And a value no longer carries the settings it was first computed under: the + parse cache and the caches on a node, Evaled among them, gave the first answer back under any + settings and on any thread. Outside a settings scope nothing moves. +

+

+ Wrong answers fixed include a definite integral whose antiderivative crosses a branch cut off the real + line (integral(1/(1+(t-3i)^2), t, -oo, +oo) was pi, and is 0), a + rational guessed for a root inside the tolerance it was guessed under (x^2 - 3x - 1e-24 was + { 0, 3 }), and two periodic unknowns of a system that shared one parameter. New are + MathS.AreEqual, an equality question with three answers; systems from a conjunction, and with + each parameter's set; a product over a set and a prime factorisation; the total and the partial derivative + in an unknown function; zeta, beta, the p-norm, and the gradient, divergence and + curl; shader source; dimensional analysis of a formula; and Unicode output. +

+

+ Dimensional analysis and shader source together, on a water wave. Its dispersion relation is ω² = g k tanh(k h), with + ω the angular frequency, k the wave number and h the depth. In + shallow water tanh(k h) is close to k h, and writing ω = sqrt(g k h) + for that, a factor of k short, is a typical slip, which + MathS.Dimensions + finds inside the phase of the wave. It also gives the wave's dimensionless groups, and + MathS.Shaders + prints the surface height, with ω put in, as HLSL: +

+ +
using System.Collections.Generic;
+using AngouriMath.Core;
+
+var (L, T) = (Dimension.Length, Dimension.Time);
+var dims = new Dictionary<Variable, Dimension>
+{
+    ["omega"] = Dimension.Dimensionless / T, ["g"] = L / T.Pow(2), ["k"] = Dimension.Dimensionless / L,
+    ["h"] = L, ["A"] = L, ["x"] = L, ["t"] = T,
+};
+Console.WriteLine(MathS.Dimensions.Of("omega^2 = g k tanh(k h)", dims));
+Console.WriteLine(MathS.Dimensions.Of("A sin(k x - sqrt(g k h) t)", dims));
+foreach (var group in MathS.Dimensions.DimensionlessGroups(new Variable[] { "k", "g", "A", "h", "t" }, dims))
+    Console.WriteLine(group);
+
+Entity height = "A sin(k x - omega t)";
+height = height.Substitute("omega", "sqrt(g k tanh(k h))");
+Console.WriteLine(MathS.Dimensions.Of(height, dims));
+Console.Write(MathS.Shaders.Hlsl(new List<KeyValuePair<string, Entity>> { new("height", height) }).Code);
+

Prints:

+
Consistent: 1
+Inconsistent at k * x - sqrt(g * k * h) * t: k * x has dimension 1 and sqrt(g * k * h) * t has dimension L^(1/2), so they cannot be subtracted
+k * A
+k * h
+k * g * t ^ 2
+Consistent: L
+height = (A * sin(((k * x) - (sqrt(((g * k) * (1.0 + (((-1.0) - 1.0) / (exp((2.0 * (k * h))) + 1.0))))) * t))));
+

+ The surface depends on the amplitude, the depth and the time only through k A, the steepness, + k h, the depth in wavelengths, and g k t², the time in units of the deep-water + period. The shader computes what Compile<double, …> computes, and writes + tanh so that it is 1 for a large argument rather than infinity over infinity. +

+

+ Every input whose result is now different is listed, with both values and why, in + BREAKING-CHANGES.md + under 2.8.0 — since 2.7.0. Read that before upgrading. + It holds 28 entries, and 12 of them are silent: the call still succeeds and returns something else. + The ones to read first: a family of roots is a set of another type, an indexed union where + Solve gave a FiniteSet, so code that takes the answer apart as a + FiniteSet gets another node. Names read differently: factorization(…) and + primefactors(…) are functions where they were products; factorize(…), + nextprime(…), divisors(…) and φ(…) are refused by name, with what to + write instead; and gradient, divergence and curl take the variables + as their second argument. Silently, a value cached under one setting is no longer given back under + another. And MathS.NumberTheory.Factorize throws InvalidNumberException for 0 + and negative integers, where it answered the empty list. + Assembly version stays 2.0.0.0, and nothing public was removed, so code that compiled + against 2.7.0 still compiles; but a solver's answer can now be another type, so this is not a drop-in + replacement for 2.7.0. The full notes are on the 2.8.0 release. +

+
+ +
2.7.0

A release about limits and compilation. limitcheck compares a limit with the values the expression takes near the point. On the 40 of its seeds that both versions complete, 2.6.0 answers 2,685 limits