Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
571dcb9
[no-new-version] Algebra: decimal values of the solutions, copy and r…
claude Nov 12, 2026
c56de7f
[no-new-version] Pin the .NET 10 SDK and compare Count instead of Any()
claude Nov 12, 2026
2a33e3b
[no-new-version] Compare Count instead of Any() in the engine tests
claude Nov 12, 2026
f150700
[no-new-version] Graphs: formula caption, shared parameters, copy image
claude Nov 12, 2026
be81f16
[no-new-version] Compare Count instead of Any() in the numeric compiler
claude Nov 12, 2026
5d91a22
Math tools: formulas with graphs, Greek parameters, more units [no-ne…
claude Nov 12, 2026
4dcab3c
Serialize the math tools JSON with a source-generated context so the …
claude Nov 12, 2026
e78fd2e
Keep the computed worksheet properties out of the saved JSON [no-new-…
claude Nov 12, 2026
7e50258
Math tools: graphs in space, OpenGL with a Skia fallback [no-new-vers…
claude Nov 12, 2026
6538ad7
[no-new-version] 3D graphs: debounced redraw, copy image, reset view …
claude Nov 12, 2026
2a19319
Add the adapter of the engine of Microsoft Mathematics for the refere…
claude Nov 12, 2026
444216b
[no-new-version] Call mathenginen from one dedicated STA thread
claude Nov 12, 2026
96bcd5f
[no-new-version] MathEngine: solve via SymbolicSolve, read linear res…
claude Nov 12, 2026
5e8acbb
[no-new-version] MathEngine: real field, variable names, full simplif…
claude Nov 12, 2026
28e59e1
[no-new-version] MathEngine: solve among complex numbers, evaluate am…
claude Nov 12, 2026
650e436
[no-new-version] MathEngine: read |x| and systems with equal values, …
claude Nov 12, 2026
1eff3c8
[no-new-version] MathEngine: solve for the asked letter by swapping, …
claude Nov 12, 2026
b1d9dbd
[no-new-version] MathEngine: solve among the reals when the complex r…
claude Nov 12, 2026
f4de7e4
[no-new-version] MathEngine: sines and cosines of multiple angles by …
claude Nov 14, 2026
30aeb8b
Math tools: graphs in space, OpenGL with a Skia fallback [no-new-vers…
claude Nov 12, 2026
d511ae2
[no-new-version] 3D graphs: debounced redraw, copy image, reset view …
claude Nov 12, 2026
269d4f8
Merge branch 'ccr-f0e25fb4-eczbl3-3d' into ccr-f0e25fb4-eczbl3-mathen…
simonebortolin Nov 14, 2026
874d772
[no-new-version] Sum the series to infinity of known forms for Angour…
claude Nov 14, 2026
73d327e
[no-new-version] Series: sum the quotients of polynomials by partial …
claude Nov 14, 2026
8b02551
[no-new-version] Reference cases for the series to infinity
claude Nov 15, 2026
4ac4ae5
[no-new-version] MathEngine: skip the series to infinity the engine g…
simonebortolin Nov 15, 2026
31cec4a
Merge main into the MathEngine adapter and the series [no-new-version]
claude Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ generated parser, on netstandard2.0): keep it so, and keep containers and other
| `samples/SharpEquations.WinForms.Demo/` | A form with the editor of `SharpEquations.WinForms` (Windows) |
| `samples/SharpEquations.Avalonia.Browser.Demo/` | The same demo on WebAssembly (needs the `wasm-tools` workload, so not in the solution; `.github/workflows/demo.yml` publishes it to GitHub Pages) |
| `samples/SharpEquations.Avalonia.MathTools.Demo/` | A second app, math tools around the editor, in MVVM: the view models (`ViewModels/`: `MathToolsViewModel` and one for each page, over a small `ObservableObject` and `RelayCommand`, no package; the tests drive them) and the views in AXAML with compiled bindings (`Views/`: `MathToolsView`, with the brushes, the styles and the `Card` of the pages, a page each: the scientific keypad, the library of formulas, whose Graph button draws a formula on the graphs page, the unit converter, the solver of triangles, the graphs: `GraphsPage` on a `GraphView`, a slider for each parameter; the graphs in space: `Graphs3DPage` on a `Graph3DView`, OpenGL through Silk.NET where there is a context and the Skia painter elsewhere, in the browser too; the worksheet: `WorksheetPage`) and the desktop window |
| `samples/SharpEquations.MathTools.Core/` | The math tools without a user interface: `ICasEngine` (`AngouriMathEngine`, through `MathReader`, which reads what the normalized presentation MathML means: in radians or degrees, systems of equations, definitions `a≔5`), the formulas (a `GraphPreset` for those with a graph: the equation drawn and its parameters at their starting values, Greek letters too), the units (NIST factors) and triangles, the equations of the graphs in space (`SurfacePlot`: z=f(x,y) or a curve x,y,z of t, with their parameters), the `Worksheet` (the history of what was computed, kept as JSON in the settings, its definitions made again when it is read back), and the services the views ask the platform for (`ISettingsStore`: a file on the desktop, the local storage in the browser) |
| `samples/SharpEquations.MathTools.Core/` | The math tools without a user interface: `ICasEngine` (`AngouriMathEngine`, through `MathReader`, which reads what the normalized presentation MathML means: in radians or degrees, systems of equations, definitions `a≔5`; `Series` sums to infinity the quotients of polynomials AngouriMath leaves as they are, by partial fractions over `Polynomial`s of `Fraction`s), the formulas (a `GraphPreset` for those with a graph: the equation drawn and its parameters at their starting values, Greek letters too), the units (NIST factors) and triangles, the equations of the graphs in space (`SurfacePlot`: z=f(x,y) or a curve x,y,z of t, with their parameters), the `Worksheet` (the history of what was computed, kept as JSON in the settings, its definitions made again when it is read back), and the services the views ask the platform for (`ISettingsStore`: a file on the desktop, the local storage in the browser) |
| `samples/SharpEquations.MathTools.Graphing/` | The graphs of the math tools without a user interface: the region shown (`Viewport`), the marks of the axes, the points of a curve (`Sampler`: closer where it bends, broken at asymptotes and steps) and where a relation of x and y holds (`Contours`); in space, the meshes and curves in a cube (`Scene3D`), the camera turning around it (`OrbitCamera`) and the painter's algorithm that draws them without a graphics card (`Painter3D`) |
| `samples/SharpEquations.MathTools.MathEngine/` | An optional adapter of the engine of Microsoft Mathematics (`mathenginen.dll`, never in this repository: looked for in `MATHENGINEN_PATH`, else in the program files) as an `ICasEngine`, to compare its results with AngouriMath; `MathEngineText` writes its linear input and reads its results without the library. Windows only, the library of the processor of the process; its reference tests are skipped elsewhere |
| `samples/SharpEquations.Avalonia.Browser.MathTools.Demo/` | The math tools on WebAssembly (as the web demo, not in the solution build; `demo.yml` publishes them under `math/`) |
| `benchmarks/SharpEquations.Benchmarks/` | BenchmarkDotNet benchmarks of reading, writing and converting the corpora |
| `tests/SharpEquations.Tests/` | TUnit tests, in folders by subject (PublicApi, MathML, Omml, Mtef, UnicodeMath, LaTeX, Property, Regression) |
| `tests/SharpEquations.Avalonia.Tests/` | TUnit tests of the editor (Editing, Rendering, and the controls in a headless Avalonia session with Skia), and of the views of the math tools |
| `tests/SharpEquations.Uno.Tests/` | TUnit tests of the controls of `SharpEquations.Uno` in a real Uno app on the desktop (`Program` starts the app, then runs TUnit; the tests work on its thread through `Ui.Run`); it needs a display: `xvfb-run` on Linux |
| `tests/SharpEquations.Wpf.Tests/` | TUnit tests of the controls of `SharpEquations.Wpf` in a window on a thread of its own (`Ui`: STA, with its dispatcher); they build everywhere and run on Windows only |
| `tests/SharpEquations.WinForms.Tests/` | TUnit tests of the controls of `SharpEquations.WinForms` in a form on a thread of its own (`Ui`: STA, with its message loop); they build everywhere and run on Windows only |
| `tests/SharpEquations.MathTools.Tests/` | TUnit tests of `SharpEquations.MathTools.Core` and `.Graphing` (net10.0), with the reference tests of the computer algebra and the units (`tests/data/mathtools/`: cases compared by their value, the ones not reached yet `pending` with the reason; a change makes no passing case fail) |
| `tests/SharpEquations.MathTools.Tests/` | TUnit tests of `SharpEquations.MathTools.Core`, `.Graphing` and `.MathEngine` (net10.0), with the reference tests of the computer algebra and the units (`tests/data/mathtools/`: cases compared by their value, the ones not reached yet `pending` with the reason; a change makes no passing case fail) |
| `tests/data/` | Test data and its provenance (`tests/data/README.md`) |

## Code Style
Expand Down
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<PackageVersion Include="HarfBuzzSharp.NativeAssets.WebAssembly" Version="14.4.0.100" />
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Win32" Version="14.4.0.100" />
<PackageVersion Include="AngouriMath" Version="2.6.0" />
<PackageVersion Include="MathNet.Symbolics" Version="0.25.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.401" PrivateAssets="All" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
Expand Down
1 change: 1 addition & 0 deletions SharpEquations.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<Project Path="samples/SharpEquations.Avalonia.MathTools.Demo/SharpEquations.Avalonia.MathTools.Demo.csproj" />
<Project Path="samples/SharpEquations.MathTools.Core/SharpEquations.MathTools.Core.csproj" />
<Project Path="samples/SharpEquations.MathTools.Graphing/SharpEquations.MathTools.Graphing.csproj" />
<Project Path="samples/SharpEquations.MathTools.MathEngine/SharpEquations.MathTools.MathEngine.csproj" />
<Project Path="samples/SharpEquations.Uno.Demo/SharpEquations.Uno.Demo.csproj" />
<Project Path="samples/SharpEquations.WinForms.Demo/SharpEquations.WinForms.Demo.csproj" />
<Project Path="samples/SharpEquations.Wpf.Demo/SharpEquations.Wpf.Demo.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ private static List<string> Variables(IEnumerable<Entity> expressions) =>
/// <summary>Does an action to an expression of AngouriMath.</summary>
public static CasResult Run(CasAction action, Entity expression, string? variable)
{
expression = Series.Close(expression);
var letters = Variables(expression);
var x = MathS.Var(variable ?? (letters.Count > 0 ? letters[0] : "x"));
switch (action)
Expand Down Expand Up @@ -260,6 +261,9 @@ private static IReadOnlyList<Equation> Equations(IEnumerable<Entity> values)
return equations;
}

/// <summary>An expression of AngouriMath as an equation (through its LaTeX), or null when it cannot be written.</summary>
public static Equation? ToEquation(Entity value) => Parse(Latex(value));

private static Equation? Parse(string latex) =>
Equation.TryParse(latex, EquationFormat.LaTeX, new EquationOptions { Display = true }, out var parsed)
&& !parsed!.ToMathML().Descendants().Any(e => e.Name.LocalName == "merror")
Expand Down
Loading
Loading