{"id":13417921,"url":"https://github.com/asc-community/AngouriMath","last_synced_at":"2025-03-15T02:31:56.079Z","repository":{"id":37094263,"uuid":"224485143","full_name":"asc-community/AngouriMath","owner":"asc-community","description":"New open-source cross-platform symbolic algebra library for C# and F#. Can be used for both production and research purposes.","archived":false,"fork":false,"pushed_at":"2024-06-11T20:45:01.000Z","size":23460,"stargazers_count":795,"open_issues_count":132,"forks_count":76,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-03-06T10:56:44.181Z","etag":null,"topics":["algebra","arbitrary-precision","calculus","computer-algebra","csharp","differentiation","equations","fsharp","inequality","integration","jupyter","latex","math","nuget","parse","parsing","solver","symbolic-manipulation","symbolic-math"],"latest_commit_sha":null,"homepage":"https://am.angouri.org","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asc-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-27T17:38:45.000Z","updated_at":"2025-02-24T15:37:42.000Z","dependencies_parsed_at":"2024-01-05T20:51:48.216Z","dependency_job_id":"212e9418-e5f1-4bcd-8818-955e1e465115","html_url":"https://github.com/asc-community/AngouriMath","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asc-community%2FAngouriMath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asc-community%2FAngouriMath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asc-community%2FAngouriMath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asc-community%2FAngouriMath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asc-community","download_url":"https://codeload.github.com/asc-community/AngouriMath/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243675028,"owners_count":20329196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algebra","arbitrary-precision","calculus","computer-algebra","csharp","differentiation","equations","fsharp","inequality","integration","jupyter","latex","math","nuget","parse","parsing","solver","symbolic-manipulation","symbolic-math"],"created_at":"2024-07-30T22:00:55.470Z","updated_at":"2025-03-15T02:31:56.072Z","avatar_url":"https://github.com/asc-community.png","language":"C#","readme":"\u003e [!WARNING]\n\u003e AngouriMath is deprecated. You can still use it, but it's unlikely it will go forward. Full story at [wbg.gg](https://wbg.gg/blog/angourimath-deprecation)\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/asc-community/AngouriMath\"\u003e\n    \u003cimg src=\"./.github/additional/readme/icon_white.png\" alt=\"AngouriMath logo\" width=\"200\" height=\"200\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch2 align=\"center\"\u003eAngouriMath\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ci\u003eNew open-source cross-platform symbolic algebra library for \u003c/i\u003e\u003cb\u003eC# · F# · Jupyter · C++ (WIP)\u003c/b\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://am.angouri.org/quickstart/\"\u003e\u003cb\u003eGet started\u003c/b\u003e\u003c/a\u003e\n  \u003cb\u003e·\u003c/b\u003e\n  \u003ca href=\"#exam\"\u003e\u003cb\u003eExamples\u003c/b\u003e\u003c/a\u003e\n  \u003cb\u003e·\u003c/b\u003e\n  \u003ca href=\"#contrib\"\u003e\u003cb\u003eContributions\u003c/b\u003e\u003c/a\u003e\n  \u003cb\u003e·\u003c/b\u003e\n  \u003ca href=\"https://am.angouri.org/whatsnew/\"\u003e\u003cb\u003eWhat's new\u003c/b\u003e\u003c/a\u003e\n  \u003cb\u003e·\u003c/b\u003e\n  \u003ca href=\"https://am.angouri.org/\"\u003e\u003cb\u003eWebsite\u003c/b\u003e\u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://dotnetfiddle.net/u901sI\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=Fiddle\u0026message=Try%21\u0026color=purple\u0026style=flat\u0026logo=.NET\u0026labelColor=646\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://mybinder.org/v2/gh/asc-community/AngouriMathLab/try\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=Jupyter\u0026message=Try%21\u0026color=purple\u0026style=flat\u0026logo=Jupyter\u0026labelColor=646\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://matrix.to/#/#angourimath:matrix.org\"\u003e\u003cimg alt=\"Join Matrix Chat\" src=\"https://img.shields.io/badge/chat%20with%20us-7eb7e2?logo=matrix\u0026style=flat\u0026labelColor=474\u0026logoColor=white\u0026color=252\"\u003e\u003c/a\u003e \n  \u003ca href=\"https://github.com/quozd/awesome-dotnet\"\u003e\u003cimg src=\"https://awesome.re/mentioned-badge.svg\"\u003e\u003c/a\u003e\n  \n\u003c/p\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eStatus board\u003c/strong\u003e\u003c/summary\u003e\n\n\n![Solution Build](https://github.com/asc-community/AngouriMath/actions/workflows/EverythingBuild.yml/badge.svg)\n\n#### Builds and tests\n|       | Kernel/C# | F# | Interactive | C++ |\n|-------|-----------|----|-------------|-----|\n| Build | ![C#/Kernel Build](https://github.com/asc-community/AngouriMath/actions/workflows/CSharpBuild.yml/badge.svg) | ![F# Build](https://github.com/asc-community/AngouriMath/actions/workflows/FSharpBuild.yml/badge.svg) | ![Interactive Build](https://github.com/asc-community/AngouriMath/actions/workflows/InteractiveBuild.yml/badge.svg) | ![C++ Build](https://github.com/asc-community/AngouriMath/actions/workflows/CPPBuild.yml/badge.svg) | \n| Test  | ![C# Test](https://github.com/asc-community/AngouriMath/actions/workflows/CSharpTest.yml/badge.svg) | ![F# Test](https://github.com/asc-community/AngouriMath/actions/workflows/FSharpTest.yml/badge.svg) | ![Interactive Test](https://github.com/asc-community/AngouriMath/actions/workflows/InteractiveTest.yml/badge.svg) | ![C++ Test](https://github.com/asc-community/AngouriMath/actions/workflows/CPPTest.yml/badge.svg) |\n\nNote, that all tests and builds are tested for the following three operating systems: Windows, Ubuntu, Mac OS.\n\n#### Coverage\n| Kernel/C# | F# | C++ |\n|-----------|----|-----|\n| \u003ca href=\"https://codecov.io/gh/asc-community/AngouriMath\"\u003e\u003cimg src=\"https://codecov.io/gh/asc-community/AngouriMath/branch/master/graph/badge.svg?token=XaA0JGyNrS\"/\u003e\u003c/a\u003e | ??? | ??? |\n\n#### Versions\n|    | Prerelease | Stable | Downloads |\n|:--:|:----------:|:------:|:---------:|\n| Kernel/C# | \u003ca href=\"https://www.nuget.org/packages/AngouriMath\"\u003e\u003cimg alt=\"Nuget (with prereleases)\" src=\"https://img.shields.io/nuget/vpre/AngouriMath?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/v/AngouriMath?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/dt/AngouriMath?color=darkblue\u0026label=Downloads\u0026style=flat-square\"\u003e\u003c/a\u003e |\n| F# | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.FSharp\"\u003e\u003cimg alt=\"Nuget (with prereleases)\" src=\"https://img.shields.io/nuget/vpre/AngouriMath.FSharp?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.FSharp\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/v/AngouriMath.FSharp?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.FSharp\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/dt/AngouriMath.FSharp?color=darkblue\u0026label=Downloads\u0026style=flat-square\"\u003e\u003c/a\u003e |\n| Interactive | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Interactive\"\u003e\u003cimg alt=\"Nuget (with prereleases)\" src=\"https://img.shields.io/nuget/vpre/AngouriMath.Interactive?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Interactive\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/v/AngouriMath.Interactive?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Interactive\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/dt/AngouriMath.Interactive?color=darkblue\u0026label=Downloads\u0026style=flat-square\"\u003e\u003c/a\u003e |\n| Experimental | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Experimental\"\u003e\u003cimg alt=\"Nuget (with prereleases)\" src=\"https://img.shields.io/nuget/vpre/AngouriMath.Experimental?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Experimental\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/v/AngouriMath.Experimental?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Experimental\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/dt/AngouriMath.Experimental?color=darkblue\u0026label=Downloads\u0026style=flat-square\"\u003e\u003c/a\u003e |\n| Terminal | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Terminal\"\u003e\u003cimg alt=\"Nuget (with prereleases)\" src=\"https://img.shields.io/nuget/vpre/AngouriMath.Terminal?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Terminal\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/v/AngouriMath.Terminal?color=blue\u0026label=NuGet\u0026logo=nuget\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003ca href=\"https://www.nuget.org/packages/AngouriMath.Terminal\"\u003e\u003cimg alt=\"Nuget\" src=\"https://img.shields.io/nuget/dt/AngouriMath.Terminal?color=darkblue\u0026label=Downloads\u0026style=flat-square\"\u003e\u003c/a\u003e |\n| C++ | \u003cimg alt=\"GitHub release (latest SemVer including pre-releases)\" src=\"https://img.shields.io/github/v/release/asc-community/AngouriMathLab?include_prereleases\u0026label=GH%20Releases\"\u003e | WIP | WIP |\n\nThere are also latest-master versions (updated on every push to master) on [MyGet](https://www.myget.org/feed/Packages/angourimath):\n| MyGet | Downloads |\n|-------|-----------|\n| [![MyGet (with prereleases)](https://img.shields.io/myget/angourimath/vpre/AngouriMath?label=AngouriMath)](https://www.myget.org/feed/angourimath/package/nuget/AngouriMath) | ![MyGet](https://img.shields.io/myget/angourimath/dt/AngouriMath?label=Downloads) |\n| [![MyGet (with prereleases)](https://img.shields.io/myget/angourimath/vpre/AngouriMath.FSharp?label=AngouriMath.FSharp)](https://www.myget.org/feed/angourimath/package/nuget/AngouriMath.FSharp) | ![MyGet](https://img.shields.io/myget/angourimath/dt/AngouriMath.FSharp?label=Downloads) |\n| [![MyGet (with prereleases)](https://img.shields.io/myget/angourimath/vpre/AngouriMath.Interactive?label=AngouriMath.Interactive)](https://www.myget.org/feed/angourimath/package/nuget/AngouriMath.Interactive) | ![MyGet](https://img.shields.io/myget/angourimath/dt/AngouriMath.Interactive?label=Downloads) |\n| [![MyGet (with prereleases)](https://img.shields.io/myget/angourimath/vpre/AngouriMath.Experimental?label=AngouriMath.Experimental)](https://www.myget.org/feed/angourimath/package/nuget/AngouriMath.Experimental) | ![MyGet](https://img.shields.io/myget/angourimath/dt/AngouriMath.Experimental?label=Downloads) |\n  \nSource to install from MyGet:\n```\nhttps://www.myget.org/F/angourimath/api/v3/index.json  \n```\n  \n#### Other info\n| Website | Stars | License |\n|---------|-------|---------|\n| \u003ca href=\"https://am.angouri.org\"\u003e\u003cimg alt=\"Website\" src=\"https://img.shields.io/website?down_message=Down\u0026label=Website\u0026up_message=Up\u0026url=https%3A%2F%2Fam.angouri.org\u0026style=flat-square\"\u003e\u003c/a\u003e | \u003cimg alt=\"GitHub Repo stars\" src=\"https://img.shields.io/github/stars/asc-community/AngouriMath?label=Stars\u0026style=flat-square\"\u003e | \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/asc-community/AngouriMath?color=dark-green\u0026label=License\u0026style=flat-square\"\u003e |\n\n\u003ca href=\"CONTRIBUTING.md\"\u003e\u003cimg alt=\"GitHub contributors\" src=\"https://img.shields.io/github/contributors/asc-community/AngouriMath\"\u003e\u003c/a\u003e\n\nIf you want, you can add a badge to your repo:\n```\n[![Powered by AngouriMath](https://img.shields.io/badge/Powered%20by-AngouriMath-purple?style=flat-square\u0026labelColor=646)](https://am.angouri.org)\n```\n[![Powered by AngouriMath](https://img.shields.io/badge/Powered%20by-AngouriMath-purple?style=flat-square\u0026labelColor=646)](https://am.angouri.org)\n\n\u003c/details\u003e\n\n\n## What is it about?\n\n\u003ca href=\"https://am.angouri.org\"\u003eAngouriMath\u003c/a\u003e is an open source symbolic algebra library.\nThat is, via AngouriMath, you can\nautomatically \u003ca href=\"https://am.angouri.org/wiki/07.-Solvers.html\"\u003esolve\u003c/a\u003e \nequations, systems of equations,\n\u003ca href=\"https://am.angouri.org/wiki/05.-Differentiation.html\"\u003edifferentiate\u003c/a\u003e,\n\u003ca href=\"https://am.angouri.org/wiki/01.-Expressions.html\"\u003eparse\u003c/a\u003e from string,\n\u003ca href=\"https://am.angouri.org/wiki/09.-Compilation.html\"\u003ecompile expressions\u003c/a\u003e, work\nwith \u003ca href=\"https://am.angouri.org/wiki/10.-Matrices.html\"\u003ematrices\u003c/a\u003e, find limits,\nconvert an expression to LaTeX, and \u003ca href=\"https://am.angouri.org/wiki/\"\u003emany other things\u003c/a\u003e.\n\n## Where can be used?\n\n\u003ca href=\"#jupyter\"\u003e\u003cimg src=\"./.github/additional/readme/side.PNG\" align=\"right\" width=\"25%\" alt=\"AngouriMath now supports Jupyter integration\"/\u003e\u003c/a\u003e\n\n\nThe two areas of use:\n\n\u003chr\u003e\n\n\u003cdetails\u003e\u003csummary\u003e🧪\u003cb\u003e Research / Data Science\u003c/b\u003e \u003csub\u003e[click 🖱️]\u003c/sub\u003e\u003c/summary\u003e\n  \n## \u003ca name=\"research\"\u003e\u003c/a\u003eAngouriMath for research\n\nAs F#, great first-functional language, skyrocketing in the area of data analysis and interactive research, AngouriMath\noffers a few ways to conveniently work with symbolic expressions.\n\n### Notebooks\n\n![gif](./.github/additional/readme/vscnotebook.gif)\n\nNotebooks provide amazing experience working with function visualization, for functions\nover one and two variables. With [dotnet/interactive](https://github.com/dotnet/interactive),\nit can be used in Visual Studio Code notebooks as well as Jupyter notebooks. To install\nthe package, simply run this in the notebook:\n\n```\n#r \"nuget:AngouriMath.Interactive,*-*\"\n```\n\n### Terminal\n\n[![gif](./Sources/Terminal/terminal.gif)](./Sources/Terminal)\n\nAs both a demonstration sample and a convenient tool, this repository includes\ntool called AngouriMath.Terminal. It is a CLI-based program to interact with\nAngouriMath (as opposed to API-based interaction, that is, consuming it as a lib).\n\n[**[ Download ]**](https://github.com/asc-community/AngouriMathLab/releases)\n\nOr build from sources:\n```\ngit clone https://github.com/asc-community/AngouriMath\ncd AngouriMath/Sources/Terminal/AngouriMath.Terminal\ndotnet run -c release\n```\n\nSee the online [Jupyter notebook](https://mybinder.org/v2/gh/asc-community/AngouriMathLab/try?filepath=HelloBook.AngouriMath.Interactive.ipynb) on\nhow to use the F# API of AngouriMath. Note, that the C# API is still available\nvia `open AngouriMath` command, then you can call the main library's methods.\n\nSee its [source folder](./Sources/Terminal).\n\n### More\n\nRead more about using AngouriMath for research on [the website](https://am.angouri.org/research).\n\n\n  \n\u003c/details\u003e\n\n\u003chr\u003e\n\n\u003cdetails\u003e\u003csummary\u003e💻\u003cb\u003e Software Development\u003c/b\u003e \u003csub\u003e[click 🖱️]\u003c/sub\u003e\u003c/summary\u003e\n\u003cbr\u003e\n  \nIt is installed from [nuget](https://am.angouri.org/quickstart/#dotnet) for both C# and F# and can be used by Web/Desktop/Mobile development.\n\n## Installing the library\n1. Install AngouriMath from [NuGet](https://www.nuget.org/packages/AngouriMath).\n2. Write the following code:\n```cs\nusing AngouriMath; using System;\nEntity expr = \"x + sin(y)\";\nConsole.WriteLine(expr);\n```\n3. Run.\n\n\u003ca href=\"https://am.angouri.org/quickstart/\"\u003e\u003cstrong\u003eMore detailed Quick Start\u003c/strong\u003e\u003c/a\u003e.\n\nIf you are new to AM, we suggest you checking out some samples instead of reading boring \ndocumentation. If you want to contribute, we would be happy to welcome you in our\ncommunity.\n\nFor any questions, feel free to contact us via \u003ca href=\"https://discord.gg/YWJEX7a\"\u003eDiscord\u003c/a\u003e.\n\nOfficial website: [am.angouri.org](https://am.angouri.org/).\n\n\u003ca id=\"exam\"\u003e\u003c/a\u003e\n\n## Examples\n\nExpand any section to see. Examples with live shell are on the [website](https://am.angouri.org/).\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eComputations\u003c/strong\u003e\u003c/summary\u003e\n\nUse as a simple calculator:\n```cs\nEntity expr = \"1 + 2 * log(3, 9)\";\nConsole.WriteLine(expr.EvalNumerical());\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=5\"\u003e\n\n```cs\nConsole.WriteLine(\"2 / 3 + sqrt(-16)\".EvalNumerical());\n\u003e\u003e\u003e 2 / 3 + 4i\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\frac{2}{3} %2B 4i\"\u003e\n\n```cs\nConsole.WriteLine(\"(-2) ^ 3\".EvalNumerical());\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=-8\"\u003e\n\nBuild expressions with variables and substitute them:\n```cs\nEntity expr = \"2x + sin(x) / sin(2 ^ x)\";\nvar subs = expr.Substitute(\"x\", 0.3m);\nConsole.WriteLine(subs);\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=2\\times \\frac{3}{10}%2B\\frac{\\sin\\left(\\frac{3}{10}\\right)}{\\sin\\left(\\sqrt[10]{2}^{3}\\right)}\"\u003e\n\nSimplify complicated expressions:\n```cs\nConsole.WriteLine(\"2x + x + 3 + (4 a * a^6) / a^3 / 5\".Simplify());\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=3%2B\\frac{4}{5}\\times {a}^{4}%2B3\\times x\"\u003e\n\n```cs\nvar expr = \"1/2 + sin(pi / 4) + (sin(3x)2 + cos(3x)2)\";\nConsole.WriteLine(expr.Simplify());\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\frac{1}{2}\\times \\left(1%2B\\sqrt{2}\\right)%2B1\"\u003e\n\nCompiled functions work 15x+ faster\n```cs\nvar x = MathS.Variable(\"x\");\nvar expr = MathS.Sin(x) + MathS.Sqrt(x) / (MathS.Sqrt(x) + MathS.Cos(x)) + MathS.Pow(x, 3);\nvar func = expr.Compile(x);\nConsole.WriteLine(func.Substitute(3));\n```\n\n```cs\nvar expr = \"sin(x) + sqrt(x) / (sqrt(x) + cos(x)) + x3\";\nvar compiled = expr.Compile(\"x\");\nConsole.WriteLine(compiled.Substitute(4));\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eAlgebra\u003c/strong\u003e\u003c/summary\u003e\n\nStart with boolean algebra:\n```cs\nEntity expr1 = \"a and b or c\";\n\n// Those are the same\nEntity expr3 = \"a -\u003e b\";\nEntity expr3 = \"a implies b\";\n```\n\n```cs\nEntity expr = \"a -\u003e true\";\nConsole.WriteLine(MathS.SolveBooleanTable(expr, \"a\"));\n```\n\n```\n\u003e\u003e\u003e Matrix[2 x 1]\n\u003e\u003e\u003e False\n\u003e\u003e\u003e True\n```\n\nNext, solve some equations:\n```cs\nConsole.WriteLine(\"x^2 + x + a\".SolveEquation(\"x\"));\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\left\\{\\frac{-1-\\sqrt{1-4\\times a}}{2},\\frac{-1%2B\\sqrt{1-4\\times a}}{2}\\right\\}\"\u003e\n\nUnder developing now and forever (always available)\n```cs\nEntity expr = \"(sin(x)^2 - sin(x) + a)(b - x)((-3) * x + 2 + 3 * x ^ 2 + (x + (-3)) * x ^ 3)\";\nConsole.WriteLine(expr.SolveEquation(\"x\").Latexise());\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\left\\{-\\left(-\\arcsin\\left(\\frac{1-\\sqrt{1-4\\times a}}{2}\\right)-2\\times \\pi\\times n_{1}\\right),-\\left(-\\pi--\\arcsin\\left(\\frac{1-\\sqrt{1-4\\times a}}{2}\\right)-2\\times \\pi\\times n_{1}\\right),-\\left(-\\arcsin\\left(\\frac{1%2B\\sqrt{1-4\\times a}}{2}\\right)-2\\times \\pi\\times n_{1}\\right),-\\left(-\\pi--\\arcsin\\left(\\frac{1%2B\\sqrt{1-4\\times a}}{2}\\right)-2\\times \\pi\\times n_{1}\\right),\\frac{-b}{-1},-i,i,1,2\\right\\}\"\u003e\n\nTry some inequalities:\n```cs\nConsole.WriteLine(\"(x - 6)(x + 9) \u003e= 0\".Solve(\"x\"));\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\left\\{-9,6\\right\\}\\cup\\left(-\\infty%3B-9\\right)\\cup\\left(6%3B\\infty\\right)\"\u003e\n\nSystems of equations:\n```cs\nvar system = MathS.Equations(\n    \"x^2 + y + a\",\n    \"y - 0.1x + b\"\n);\nConsole.WriteLine(system);\nvar solutions = system.Solve(\"x\", \"y\");\nConsole.WriteLine(solutions);\n```\nSystem:\n\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\begin{cases}{x}^{2}%2By%2Ba = 0\\\\y-\\frac{1}{10}\\times x%2Bb = 0\\\\\\end{cases}\"\u003e\n\nResult:\n\n\u003cimg src=\"./.github/additional/readme/pic1.PNG\"\u003e\n\n```cs\nvar system = MathS.Equations(\n    \"cos(x2 + 1)^2 + 3y\",\n    \"y * (-1) + 4cos(x2 + 1)\"\n);\nConsole.WriteLine(system.Latexise());\nvar solutions = system.Solve(\"x\", \"y\");\nConsole.WriteLine(solutions);\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\begin{cases}{\\cos\\left({x}^{2}%2B1\\right)}^{2}%2B3\\times y = 0\\\\y\\times -1%2B4\\times \\cos\\left({x}^{2}%2B1\\right) = 0\\\\\\end{cases}\"\u003e\n(solution matrix is too complicated to show)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eCalculus\u003c/strong\u003e\u003c/summary\u003e\n\nFind derivatives:\n```cs\nEntity func = \"x^2 + ln(cos(x) + 3) + 4x\";\nEntity derivative = func.Differentiate(\"x\");\nConsole.WriteLine(derivative.Simplify());\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=4%2B\\frac{\\sin\\left(x\\right)}{{\\ln\\left(\\cos\\left(x\\right)%2B3\\right)}^{2}\\times \\left(\\cos\\left(x\\right)%2B3\\right)}%2B2\\times x\"\u003e\n\nFind limits:\n```cs\nWriteLine(\"(a x^2 + b x) / (e x - h x^2 - 3)\".Limit(\"x\", \"+oo\").InnerSimplified);\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\frac{a}{-h}\"\u003e\n\nFind integrals:\n```cs\nWriteLine(\"x^2 + a x\".Integrate(\"x\").InnerSimplified);\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\frac{{x}^{3}}{3}%2Ba\\times \\frac{{x}^{2}}{2}\"\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eSets\u003c/strong\u003e\u003c/summary\u003e\n\nThere are four types of sets:\n```cs\nWriteLine(\"{ 1, 2 }\".Latexise());\nWriteLine(\"[3; +oo)\".Latexise());\nWriteLine(\"RR\".Latexise());\nWriteLine(\"{ x : x^8 + a x \u003c 0 }\".Latexise());\n```\n\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\left\\{ 1, 2 \\right\\}\"\u003e\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\left[3%3B \\infty \\right)\"\u003e\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\mathbb{R}\"\u003e\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\left\\{ x %3A {x}^{8}%2B a\\times x \u003c 0 \\right\\}\"\u003e\n\nAnd there operators:\n```cs\nWriteLine(@\"A \\/ B\".Latexise());\nWriteLine(@\"A /\\ B\".Latexise());\nWriteLine(@\"A \\ B\".Latexise());\n```\n\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=A\\cup B\"\u003e\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=A\\cap B\"\u003e\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math=A\\setminus B\"\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eSyntax\u003c/strong\u003e\u003c/summary\u003e\n\nYou can build LaTeX with AngouriMath:\n```cs\nvar expr = \"x ^ y + sqrt(x) + integral(sqrt(x) / a, x, 1) + derive(sqrt(x) / a, x, 1) + limit(sqrt(x) / a, x, +oo)\";\nConsole.WriteLine(expr.Latexise());\n\u003e\u003e\u003e {x}^{y}+\\sqrt{x}+\\int \\left[\\frac{\\sqrt{x}}{a}\\right] dx+\\frac{d\\left[\\frac{\\sqrt{x}}{a}\\right]}{dx}+\\lim_{x\\to \\infty } \\left[\\frac{\\sqrt{x}}{a}\\right]\n```\n\u003cimg src=\"https://render.githubusercontent.com/render/math?math={x}^{y}%2B\\sqrt{x}%2B\\int\\left[\\frac{\\sqrt{x}}{a}\\right]dx%2B\\frac{d\\left[\\frac{\\sqrt{x}}{a}\\right]}{dx}%2B\\lim_{x\\to\\infty}\\left[\\frac{\\sqrt{x}}{a}\\right]\"\u003e\n\nYou can parse `Entity` from string with\n```cs\nvar expr = MathS.FromString(\"x + 2 + sqrt(x)\");\nEntity expr = \"x + 2 + sqrt(x)\";\n```\n\nA few convenient features: `x2` =\u003e `x^2`, `a x` =\u003e `a * x`, `(...)2` =\u003e `(...)^2`, `2(...)` =\u003e `2 * (...)`\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eCompilation\u003c/strong\u003e\u003c/summary\u003e\n\nNow you can compile expressions with pritimives into native lambdas. They will be\nat least as fast as if you wrote them in line in code, or faster if you have\nsame subexpressions in your expression.\n\n```cs\nEntity expr = \"a and x \u003e 3\";\nvar func = expr.Compile\u003cbool, double, bool\u003e(\"a\", \"x\");\nWriteLine(func(true, 6));\nWriteLine(func(false, 6));\nWriteLine(func(true, 2));\nWriteLine(func(false, 2));\n```\n\nOutput:\n\n```\nTrue\nFalse\nFalse\nFalse\n```\n\n\u003c/details\u003e\n  \n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eMultithreading\u003c/strong\u003e\u003c/summary\u003e\n\nYou are guaranteed that all functions in AM run in one thread. It is also guaranteed that you can safely run multiple \nfunctions from AM in different threads, that is, all static variables and lazy properties are thread-safe.\n\nThere is also support of cancellation a task. However, to avoid injecting the cancellation token argument into all methods,\nwe use `AsyncLocal\u003cT\u003e` instead. That is why instead of passing your token to all methods what you need is to pass it once\nto the `MathS.Multithreading.SetLocalCancellationToken(CancellationToken)` method.\n\nThere is a sample code demonstrating cancellation:\n\n```cs\nvar cancellationTokenSource = new CancellationTokenSource();\n\n// That goes instead of passing your token to methods\nMathS.Multithreading.SetLocalCancellationToken(cancellationTokenSource.Token);\n\n// Then you normally run your task\nvar currTask = Task.Run(() =\u003e InputText.Text.Solve(\"x\"), cancellationTokenSource.Token);\n\ntry\n{\n    await currTask;\n    LabelState.Text = currTask.Result.ToString();\n}\ncatch (OperationCanceledException)\n{\n    LabelState.Text = \"Operation canceled\";\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eF#\u003c/strong\u003e\u003c/summary\u003e\n\n\u003ca href=\"https://www.nuget.org/packages/AngouriMath.FSharp\"\u003eDownload\u003c/a\u003e\n\nNot everything is supported directly from F#, so if something missing, you will need\nto call the necessary methods from AngouriMath.\n\n```fs\nopen Functions\nopen Operators\nopen Shortcuts\n\nprintfn \"%O\" (solutions \"x\" \"x + 2 = 0\")\n\nprintfn \"%O\" (simplified (solutions \"x\" \"x^2 + 2 a x + a^2 = 0\"))\n\nprintfn \"%O\" (``dy/dx`` \"x^2 + a x\")\n\nprintfn \"%O\" (integral \"x\" \"x2 + e\")\n\nprintfn \"%O\" (``lim x-\u003e0`` \"sin(a x) / x\")\n\nprintfn \"%O\" (latex \"x / e + alpha + sqrt(x) + integral(y + 3, y, 1)\")\n\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\u003csummary\u003e\u003cstrong\u003eC++ (Experimental)\u003c/strong\u003e\u003c/summary\u003e\n\nAt the moment, AngouriMath.CPP is in the experimental phase. See \u003ca href=\"https://am.angouri.org/quickstart/#cpp\"\u003ehow to get AngouriMath for C++\u003c/a\u003e.\n```cpp\n#include \u003cAngouriMath.h\u003e\n\nint main()\n{\n    AngouriMath::Entity expr = \"x y + 2\";\n    std::cout \u003c\u003c expr.Differentiate(\"x\");\n}\n```\n\n\u003c/details\u003e\n\n  \n\u003c/details\u003e\n\n\u003chr\u003e\n\n## \u003ca name=\"contrib\"\u003e\u003c/a\u003eContribution\n\nAngouriMath is a free open-source project, there is no big company backing us. That is why we warmly welcome any contributors\nto the project. Aside from volunteer donations, you can help developing the project: check the [guide for developers](./CONTRIBUTING.md).\n\n## \u003ca name=\"license\"\u003e\u003c/a\u003eLicense \u0026 citation\n\n\u003ca href=\"./LICENSE.md\"\u003e\u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/asc-community/AngouriMath?color=purple\u0026label=License\u0026style=flat-square\"\u003e\u003c/a\u003e [![DOI](https://zenodo.org/badge/224485143.svg)](https://zenodo.org/badge/latestdoi/224485143)\n\nThe project is open source, but can be used in closed commercial projects. There is no restriction on it\nwith the only requirement to keep the MIT license with all distributives of AngouriMath.\n\n","funding_links":[],"categories":["Great libraries","Text-Template","Uncategorized","Mathematics","Parsing"],"sub_categories":["AngouriMath","Uncategorized","GUI - other"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasc-community%2FAngouriMath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasc-community%2FAngouriMath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasc-community%2FAngouriMath/lists"}