Repository navigation
Math tools: the calculator computes with AngouriMath - #44
Open
simonebortolin wants to merge 1 commit into
Open
simonebortolin wants to merge 1 commit into
simonebortolin wants to merge 1 commit into
Conversation
MathReader reads what an equation means from its normalized presentation MathML, as an expression of AngouriMath: implicit multiplication, functions applied (sin x, sin²x, log_2 x), fractions, roots, powers, absolute values, factorials, sums, products and integrals with their limits, d/dx. The calculator shows the value of what is typed as it is typed (exact and decimal), and solves, simplifies, expands, factors, differentiates and integrates on a click; the results come back through the LaTeX of AngouriMath, drawn and ready to go back to the editor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SyVio8afJsGwHW9i5v5HDs
|
Pre-release NuGet package of 4fe9ead. Updated on every push, deleted when this PR is closed. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #42. It is a trial of AngouriMath (MIT, 2.6.0). The package goes into the math tools sample only; the core and the editor packages stay without dependencies.
What it does
MathReaderreads what an equation means from its normalized presentation MathML and builds an expression of AngouriMath. It handles:2x);sin x,sin²x,sin⁻¹x,log_2 x);|x|,⌊x⌋,⌈x⌉,n!;dxorⅆx(the parser groups the integrand with its differential, soMathReaderunpacks that group);d/dx;=; a trailing=is dropped.What it cannot read, it reports with a message.
Algebraruns the actions:√2+1/3, then≈ 1.747546896);The results come back through the LaTeX of AngouriMath, which SharpEquations reads.
"Compute" card in the calculator:
AngouriMath runs on another thread, with a 10-second timeout.
WebAssembly
It works in the browser: I checked the published site with Playwright, typing in the editor and clicking Solve. The trade-offs:
The alternative is to keep it desktop only, by removing the package reference from the browser project.
Tests
AlgebraTests:CalculatorComputes.Generated by Claude Code