AngouriMath 1.0.20

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package AngouriMath --version 1.0.20
NuGet\Install-Package AngouriMath -Version 1.0.20
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AngouriMath" Version="1.0.20" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AngouriMath --version 1.0.20
#r "nuget: AngouriMath, 1.0.20"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AngouriMath as a Cake Addin
#addin nuget:?package=AngouriMath&version=1.0.20

// Install AngouriMath as a Cake Tool
#tool nuget:?package=AngouriMath&version=1.0.20
Build an expression
var x = MathS.Var("x");
var y = MathS.Var("y");
var c = x * y + x / y;
Console.WriteLine(MathS.Sqr(c));
>>> (x * y + x / y) ^ 2
Use as a simple calculator
var inp = "1 + 2 * log(9, 3)";
var expr = MathS.FromString(inp);
Console.WriteLine(expr.Eval());
>>> 5
Substitute variables
var x = MathS.Var("x");
var expr = x * 2 + MathS.Sin(x) / MathS.Sin(MathS.Pow(2, x));
var subs = expr.Substitute(x, 0.3);
Console.WriteLine(subs.Eval());
>>> 0,9134260185941638
Find derivatives
var x = MathS.Var("x");
var func = MathS.Sqr(x) + MathS.Ln(MathS.Cos(x) + 3) + 4 * x;
var derivative = func.Derive(x);
Console.WriteLine(derivative.Eval());
>>> 2 * x + -1 * sin(x) / (cos(x) + 3) + 4
Build expressions faster
Entity expr = "sqr(x + y)";
Console.WriteLine(expr.Expand().Simplify());
>>> 2 * x * y + x ^ 2 + y ^ 2
Simplify
var x = MathS.Var("x");
var a = MathS.Var("a");
var b = MathS.Var("b");
var expr = MathS.Sqrt(x) / x + a * b + b * a + (b - x) * (x + b) + 
    MathS.Arcsin(x + a) + MathS.Arccos(a + x);
Console.WriteLine(expr.Simplify());
>>> 1.5707963267948966 + 2 * a * b + b ^ 2 + x ^ (-0.5) - x ^ 2
Render latex
var x = MathS.Var("x");
var y = MathS.Var("y");
var expr = x.Pow(y) + MathS.Sqrt(x + y / 4) * (6 / x);
Console.WriteLine(expr.Latexise());
>>> {x}^{y}+\sqrt{x+\frac{y}{4}}*\frac{6}{x}
Play with complex numbers
var expr = MathS.Pow(MathS.e, MathS.pi * MathS.i);
Console.WriteLine(expr);
Console.WriteLine(expr.Eval());
>>> 2,718281828459045 ^ 3,141592653589793i
>>> -1
Solve equations analytically

Under developing now and forever (always available)

Entity expr = "(sin(x)2 - sin(x) + a)(b - x)((-3) * x + 2 + 3 * x ^ 2 + (x + (-3)) * x ^ 3)";
foreach (var root in expr.Solve("x"))
    Console.WriteLine(root);
>>> arcsin((1 - sqrt(1 + (-4) * a)) / 2) - (-2) * n * pi
>>> 2 * n * pi + pi - arcsin((1 - sqrt(1 + (-4) * a)) / 2)
>>> arcsin(0.5 * (1 + sqrt(1 + (-4) * a))) - (-2) * n * pi
>>> 2 * n * pi + pi - arcsin((1 + sqrt(1 + (-4) * a)) / 2)
>>> b
>>> -i
>>> i
>>> 1
>>> 2
Solve systems of non-linear equations

Under developing now and forever (always available)

var system = MathS.Equations(
    "cos(x2 + 1)^2 + 3y",
    "y * (-1) + 4cos(x2 + 1)"
);
Console.WriteLine(system.Latexise());
var solutions = system.Solve("x", "y");
Console.WriteLine(Solutions.PrintOut());
Integrate

Only definite integral over single variable is supported yet 😦

var x = MathS.Var("x");
var expr = MathS.Sin(x) + MathS.Sqrt(x) / (MathS.Sqrt(x) + MathS.Cos(x)) + MathS.Pow(x, 3);
Console.WriteLine(expr.DefiniteIntegral(x, -3, 3));
var expr2 = MathS.Sin(x);
Console.WriteLine(expr2.DefiniteIntegral(x, 0, MathS.pi));
>>> 5.56669223384056 + 0.0889406793629381i
>>> 1.98003515236381
Compile functions

Compiled functions work 15x+ faster

var x = MathS.Var("x");
var expr = MathS.Sin(x) + MathS.Sqrt(x) / (MathS.Sqrt(x) + MathS.Cos(x)) + MathS.Pow(x, 3);
var func = expr.Compile(x);
Console.WriteLine(func.Substitute(3));
Try new syntax
var expr = MathS.FromString("3x3 + 2 2 2 - x(3 0.5)");
Console.WriteLine(expr);
>>> 3 * x ^ 3 + 2 ^ 2 ^ 2 - x * sqrt(3)
Try SymPy syntax
var x = SySyn.Symbol("x");
var expr = SySyn.Exp(x) + x;
Console.WriteLine(SySyn.Diff(expr));
Console.WriteLine(SySyn.Diff(expr, x));
Console.WriteLine(SySyn.Diff(expr, x, x));
Translate number systems
string x = MathS.ToBaseN(-32.25, 4);
Console.WriteLine("-32.25(10) = " + x + "(4)");
double y = MathS.FromBaseN("AB.3", 16);
Console.WriteLine("AB.3(16) = " + y + "(1)");
>>> -32.25(10) = -200.1(4)
>>> AB.3(16) = 171,1875(1)
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on AngouriMath:

Package Downloads
AngouriMath.FSharp The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

F# wrapper for some functions from AngouriMath. https://am.angouri.org/quickstart/index.html

CSharpMath.Evaluation

Can convert CSharpMath.Atom.MathList parsed from LaTeX with CSharpMath.Atom.LaTeXParser into actual mathematical expressions that are evaluatable with AngouriMath. Supports arithmetic, trigonometry, symbolic simplification and expansion, as well as matrices, sets, and equation solving.

GitHub repositories (2)

Showing the top 2 popular GitHub repositories that depend on AngouriMath:

Repository Stars
asc-community/AngouriMath
New open-source cross-platform symbolic algebra library for C# and F#. Can be used for both production and research purposes.
verybadcat/CSharpMath
LaTeX. in C#. (ported from the wonderful iosMath project).
Version Downloads Last updated
1.4.0-preview.3 7,267 12/3/2021
1.4.0-preview.2 2,266 9/15/2021
1.4.0-preview.1 1,845 8/7/2021
1.3.0 104,719 7/2/2021
1.3.0-rc.4 675 7/1/2021
1.3.0-rc.3 178 7/1/2021
1.3.0-rc.2 169 7/1/2021
1.3.0-rc.1 226 6/30/2021
1.3.0-preview.4 4,780 5/9/2021
1.3.0-preview.3 2,215 4/21/2021
1.3.0-preview.2 1,310 3/25/2021
1.3.0-preview.1 449 3/11/2021
1.2.0 3,560 3/2/2021
1.2.0-preview.6 1,923 1/27/2021
1.2.0-preview.5 798 11/20/2020
1.2.0-preview.4 258 11/16/2020
1.2.0-preview.3 453 10/22/2020
1.2.0-preview.2 301 10/14/2020
1.2.0-preview.1 374 10/10/2020

Added Tensor, system of equations, polynom divisions, periodic roots for solvers, compilation boosted, simplification improved, LaTeX formatting improved, cache for compiled functions added, search boosted, tons of bugs fixed