Giter Site home page Giter Site logo

asc-community / angourimath Goto Github PK

View Code? Open in Web Editor NEW
757.0 757.0 69.0 22.9 MB

New open-source cross-platform symbolic algebra library for C# and F#. Can be used for both production and research purposes.

Home Page: https://am.angouri.org

License: MIT License

C# 92.75% GAP 1.06% Batchfile 0.08% F# 3.47% Jupyter Notebook 0.48% CMake 0.12% C++ 1.91% PowerShell 0.01% Shell 0.12%
algebra arbitrary-precision calculus computer-algebra csharp differentiation equations fsharp hacktoberfest inequality integration jupyter latex math nuget parse parsing solver symbolic-manipulation symbolic-math

angourimath's People

Contributors

adk7507 avatar bimal-parajuli avatar cyberillithid avatar davidbeh avatar djvoelker avatar dogayalcin avatar happypig375 avatar illuminati-craz avatar jaimeadf avatar kuhakupixel avatar lehonti avatar mgnslndh avatar momodeve avatar ryyanmapes avatar theseems avatar whiteblackgoose avatar willtyler1 avatar yoshiask avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

angourimath's Issues

Math constants are not recognized by compile method

Description
trying to compile expression which contains math constants such as e and pi generates exception because Compile method recognizes them as variables:

System.Collections.Generic.KeyNotFoundException: 'The given key 'e' was not present in the dictionary.'

   at System.ThrowHelper.ThrowKeyNotFoundException[T](T key)
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at AngouriMath.Entity.InnerCompile(FastExpression fe, String[] variables, Dictionary`2 varNamespace) in C:\Users\Momo\source\repos\MathS\AngouriMath\Functions\Evaluation\Compilation\FastExpression.cs:line 106
   at AngouriMath.Entity.InnerCompile(FastExpression fe, String[] variables, Dictionary`2 varNamespace) in C:\Users\Momo\source\repos\MathS\AngouriMath\Functions\Evaluation\Compilation\FastExpression.cs:line 100
   at AngouriMath.Entity.Compile(String[] variables) in C:\Users\Momo\source\repos\MathS\AngouriMath\Functions\Evaluation\Compilation\FastExpression.cs:line 48
   at Samples.Program.Main(String[] _) in C:\Users\Momo\source\repos\MathS\Samples\Samples\Program.cs:line 139

(see https://github.com/Angourisoft/MathS/blob/master/AngouriMath/Functions/Evaluation/Compilation/FastExpression.cs#L106)

To Reproduce

static void Main(string[] args)
{
    AngouriMath.Entity expr = "x - pi";
    expr.Compile("x");
}

Conditions
AngouriMath 1.0.17.2-Beta (latest)
Visual Studio 2019
Possible solution
Probably we need to replace such constants with their numeric alternatives if variables with the same names were not passed to the compile method.

Infinite loop while solving equation

Description
trying to solve expression for variable which does not exists, causes Solve method to execute forever. This happens because of infitine while loop in AnalyticalSolver:
https://github.com/Angourisoft/MathS/blob/master/AngouriMath/Functions/Algebra/AnalyticalSolver/AnalyticalSolver.cs#L61

To Reproduce

static void Main(string[] args)
{
    AngouriMath.Entity expr = "1";
    expr.Solve("x");
}

Conditions
AngouriMath 1.0.17.2-Beta (latest)
Visual Studio 2019
Possible solution
if we find Entity with no children and it is not our entity - we should break from loop. Consider checking latest commit to MomoBranch: d87422c

I want to contact with you

I am impressed with this project so can you give me your email to contact? I want to ask you something

x^2+y^2+2x*y+w -> w+x^2+2x*y+y^2

#62 (comment)

TryPolynomial is not able to support multiple variables though. I said
There is already a sort performed by Simplify which sorts variables according to their alphabetical order. On top of this, we should follow the mathematical norm of writing higher powers of the same variable first.
So on top of y^2+x^2->x^2+y^2 we would also have x+x^2->x^2+x.
So multiple variables like x^2+y^2+2xy+w would first sort by w, then x, finally y: w+x^2+2xy+y^2

In addition, functions like cos(x) can also follow the alphabetical order of cos.

Why .NET Standard 2.1?

From NuGet, this used to target .NET Standard 2.0. Why was this changed? .NET Standard 2.1 is not supported on multiple platforms such as .NET Framework and UWP which harms adoption of this library. As far as I can see, there is nothing added in .NET Standard 2.1 that is explicitly used by this library. It would be better to switch back.

What?

Describe the bug

AngouriMath.MathS.Equations("a+b-c", "3a+3b-2c", "3a+4b-4c").Solve("a", "b", "c").Latexise()

\begin{pmatrix}NaN + NaNi & -NaN + NaNi & NaN + NaNi+-NaN + NaNi\end{pmatrix}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.