Repository navigation
Let's compare ourselves to alternatives... #184
Description
Activity
Nice!
You compiled a long list.SymPy I guess is half-way, the goal is WolframAlpha. For example, recently I wanted to see how SymPy solves a trigonometric equation and guess what? It couldn't solve it. I think SymPy is rather a mess of genious mathematical ideas mixed into something that works sometimes. Of course, we're still far from that, but it might be not the finish-line for us :).
I think we can indeed surpass Math.Net, even if it's so popular and etc. We can integrate things way faster than big boys.
Thank you for the list again, mb we will add some more to it.
Reacted by Hadrian Tangsec, csc, asec, acsc
useless functions. They exist because someone was so stupid to suggest
sin^-1(x)mean other than power. Why not haveasin, acos, atan, acotas inverse functions and write 1/sin 1/cos and etc?Supports boolean algebra but can't parse expressions from string
We also support it, doesn't we? @WhiteBlackGoose
lol it was in our old website codebaseHas more stars and watchers but less NuGet downloads (lol)
Nuget downloads also come from CI systems so its hard to judge how many people use the library
https://github.com/sympy/sympy This is our dream to reach
Actually we noticed that sympy cannot solve 4-th degree polynoms with non-numeric constants and trigonometric equations like
sin(2x + 2) + sin(x + 1) - aAlso I think we gotta dig deeper into our alternative's simplification algorithms, because even though I've been working on it since AM's start, it seems to suck 😢
@MomoDeve you're probably referring to this https://github.com/WhiteBlackGoose/asc-community/blob/master/ascsite/Core/AscSci/AscMath/BoolEng.cs
C# 9 will come with Visual Studio 16.7 and with the
and,or,notpatterns, records, and covariant returns I'll refactor AngouriMath into a much cleaner state.In what way you want to refactor it?
From Discord
So I've been thinking of replacing Pattern objects with C# Patterns because they are type-unsafe and replacing Entity.Children with properties that match the functions, e.g. Logf as a class has Base and Num as properties
They exist because someone was so stupid to suggest sin^-1(x) mean other than power.
Just wait till you see https://en.wikipedia.org/wiki/Versine and https://en.wikipedia.org/wiki/Exsecant
Nuget downloads also come from CI systems so its hard to judge how many people use the library
Stars and watchers also don't translate to actual uses. People could leave a star then go onto other projects to star. There doesn't seem to be a better metric to use.
Stars and watchers also don't translate to actual uses. People could leave a star then go onto other projects to star. There doesn't seem to be a better metric to use.
Of course, we do not judge by any of those numbers, but they enourage us to keep working on AM.
Reacted by Hadrian TangWhy not have asin, acos, atan, acot as inverse functions and write 1/sin 1/cos and etc?
@WhiteBlackGoose Why did we skip sec and csc but kept cot? cot(x) = 1/tan(x) so there is an inconsistency here.
We don't have a separate node for sec and csc, but so far I don't see the reason we should have it. It's not hard to implement them though
But cot falls into the same bucket as sec and csc in that they are inverted tan, cos, sin respectively so why did we keep cot as a node?
Not really the same "bucket". Tan and cot are opposite on the triangle but symmetric. The same way sin and cos are. While sec and csc are way more rarely used & are inverted (as ^(-1)) of sine and cosine, so I didn't think we really need them
Well, cot, sec and csc are grouped together in almost all results in https://www.google.com.hk/search?sxsrf=ALeKk02Dx9VrJJlM3TQ7UWB55MqEtwYGHA%3A1596606585051&source=hp&ei=eUgqX7lzluv5Bt6TncgB&q=is+cot+more+used+than+sec&btnK=Google+Search
When we say "trigonometric functions", we either mean the 3-function group (sin, cos, tan) or the 6-function group (sin, cos, tan, cot, sec, csc). The 3-function group is taught in basic Trigonometry classes and are the group present in basic calculators. The 6-function group is taught in basic Calculus classes and are the group used in Wikipedia, on the Windows calculator, Wolfram Alpha, etc.
I have never heard of the 4-function group (sin, cos, tan, cot) excluding sec and csc until now. If we use the definition of trig functions in basic Trigonometry classes, we would not simplify 1/sin, 1/cos and 1/tan. If we use the definition of trig functions in basic Calculus classes, we would simplify 1/sin, 1/cos, 1/tan to csc, sec and cot respectively. However, with our current definition, we would see 1/sin, 1/cos and cot respectively. This is confusing behaviour and we should pick a side.
I see where you came from, and yes, I'm surely more used to what you call "4-function group". But I think we still can add secant and cosecant as nodes
Reacted by Hadrian TangI am just afraid that existance of many trigonometrc functions will complicate trigonometric solver and simlificator. We of course can do substitution right at the beginnig of solving, but its a weird solution
https://github.com/axkr/symja_android_library this might be also worth consideration
Ewwwwww GPL
https://github.com/axkr/symja_android_library this might be also worth consideration
Cannot solve
2^x + 4^x + c, bruhMeasured rather than argued. Full write-up below; everything in it comes from running both libraries on the same inputs on .NET 10.0.10, with AngouriMath built from master, MathNet.Symbolics 0.25.0 and Symbolism 1.0.4. The Math.NET column of the capability table was filled in by reflecting over its assembly, not by reading its docs.
Capability matrix
The Math.NET Symbolics column is filled in by reflecting over its assembly,
not by reading its documentation.Capability AngouriMath Math.NET Symbolics Symbolism Parse infix string yes yes no (expression trees only) Print infix yes yes yes LaTeX output yes yes no MathML output no yes no Differentiate yes yes yes Integrate (symbolic) yes no no Limits yes no no Solve equations yes no yes (basic) Solve inequalities yes no no Systems of equations yes no no Expand yes yes yes Rational simplify / cancel yes yes yes Polynomial GCD, division, partial fractions partial yes no Taylor series yes yes no Matrices / linear algebra yes no no Sets, intervals, set algebra yes no no Boolean algebra and predicates yes no no Piecewise functions yes no no Compile expression to delegate yes yes no Arbitrary-precision arithmetic yes (PeterO.Numbers) no (BigRational + double) no (double) Complex numbers yes, first class partial partial Multithreading / cancellation controls yes no no F# wrapper yes (AngouriMath.FSharp) native F# no Interactive/notebook integration yes (.NET Interactive) no no Downloads on nuget.org at time of writing: MathNet.Symbolics 748k,
AngouriMath 311k, Symbolism 54k. The purely numeric MathNet.Numerics
(71.5M) is not a symbolic library and is a complement, not a competitor.The decisive result: AngouriMath is the only actively maintained .NET library
in this set that does symbolic integration, limits, inequalities, sets and
matrices at all. Math.NET Symbolics is deliberately a smaller tool --
algebraic manipulation and differentiation, done cleanly -- and it wins on
polynomial infrastructure (GCD, partial fractions) and MathML.Same task, both libraries
Task Input AngouriMath Math.NET Symbolics differentiate x^3 + 2*x^2 + x + 11 + 3 * x ^ 2 + 4 * x1 + 4*x + 3*x^2differentiate sin(x)*cos(x)cos(2 * x)-(sin(x))^2 + (cos(x))^2differentiate ln(x)/x(1 - ln(x)) / x ^ 2 provided x > 0 and not x = 01/x^2 - ln(x)/x^2differentiate (x^2+1)/(x-1)1 + (-2) / (x - 1) ^ 2(2*x)/(-1 + x) - (1 + x^2)/(-1 + x)^2differentiate x^x(1 + ln(x)) * x ^ x provided not x = 0x^x + x^x*ln(x)expand (x + 1)^31 + x ^ 3 + 3 * (x + x ^ 2)1 + 3*x + 3*x^2 + x^3expand (a + b)*(c + d)a * (c + d) + b * c + b * da*c + b*c + a*d + b*dexpand (x + 1)^2*(x + 2)^24 + x ^ 4 + 6 * x ^ 3 + 13 * x ^ 2 + 12 * x4 + 12*x + 13*x^2 + 6*x^3 + x^4simplify (x^2 - 1)/(x - 1)x + 1 provided not x - 1 = 01 + xsimplify x/x + 0*y1 provided not x = 01simplify 2*x + 3*x - x4 * x4*xsimplify a*c + a*d + b*c + b*da * (c + d) + b * c + b * da*c + b*c + a*d + b*dWhat the table shows
Math.NET Symbolics returns tidier output on every shared task -- its results
are collected and ordered, where AngouriMath leaves1 + x ^ 3 + 3 * (x + x ^ 2)
for an expanded cube and fails to collecta*c + a*d + b*c + b*d.
That is a real, user-visible weakness and it is what issues #531, #177 and
#164 are about.The trade runs the other way on soundness. For
(x^2 - 1)/(x - 1)
Math.NET answers1 + xunconditionally, which is wrong atx = 1where the
input is undefined. AngouriMath answersx + 1 provided not x - 1 = 0and
carries the domain condition through. Same forx/x, and ford/dx ln(x)/x,
where AngouriMath recordsx > 0. Tracking removable singularities is a
deliberate design choice that costs output tidiness and buys correctness.Performance on shared operations
Median of 15 runs after 5 warm-up runs, microseconds per operation, lower is
better. These cover only what both libraries can do, so they say nothing
about the capability gaps above -- which matter far more.Operation AngouriMath (us) Math.NET Symbolics (us) Verdict parse a fresh polynomial 618.3 8.7 Math.NET 71.1x faster differentiate sin(x)*cos(x)8.9 2.0 Math.NET 4.5x faster expand (x + 1)^541.9 9.5 Math.NET 4.4x faster simplify (x^2 - 1)/(x - 1)2438.2 24.8 Math.NET 98.3x faster Since this was measured
a*c + a*d + b*c + b*dnow collects to(a + b) * (c + d)-- that was #531 and it is fixed, so the "fails to collect" line above is out of date. The polynomial-infrastructure gap (multivariate GCD, cancelling(x^2+2xy+y^2)/(x^2-y^2)) is real and is #55.The honest summary for anyone choosing between them: AngouriMath is the only actively maintained .NET library in this set that does symbolic integration, limits, inequalities, sets and matrices at all. Math.NET Symbolics is a deliberately smaller tool that is faster on the operations it shares and returns tidier output, and it answers
(x^2-1)/(x-1)as1 + xunconditionally where AngouriMath carries the domain condition. Which of those is the right trade depends on what you are building.- added a commit that references this issue
on Aug 23, 2026 This is really an Epic that is a proper superset of #717. This also needs to reach for the stars, i.e. Maple, MATLAB, Mathematica...
.NET
https://github.com/mathnet/mathnet-symbolics
https://github.com/dharmatech/Symbolism
https://github.com/sympy/sympy
JavaScript and friends
https://github.com/davidedc/Algebrite
https://github.com/aantthony/javascript-cas
https://github.com/MatthewJA/Coffeequate
https://github.com/nicolewhite/algebra.js
https://github.com/jiggzson/nerdamer
There are probably more out there...