AngouriMath
Quick start
The following page is a short instruction for getting started with AngouriMath. You may also need to address the following resources:
GitHub Repository · Wiki guide · Discord chat
Install for C# and F#
How to install from NuGet?
We recommend using .NET Command Line Interface, whose syntax for packages is
.
Also here are a few instructions how to use NuGet from IDEs:
dotnet add package MyPackage
Install for C#
dotnet add package AngouriMath
Install for F#
dotnet add package AngouriMath.FSharp
The current release is 2.6.0, and every 2.x release changes answers that earlier versions
got wrong. Whichever version you are coming from, read
BREAKING-CHANGES.md
first: it lists every input whose result is now different, with the old value and the new one,
under a heading per release. 2.6.0 is a drop-in replacement for 2.5.0 — the assembly version is
pinned at 2.0.0.0 for the whole of 2.x.
The library targets netstandard2.0, net8.0 and net10.0.
A project on net7.0 resolves the netstandard2.0 asset and loses the
generic-math surface with it, so move to net8.0 or later.
Install for Notebooks
First, make sure to have installed Interactive for .NET: follow the instructions from
the official repository.
Now you need to run a special command right in your notebook:
For F#
#r "nuget:AngouriMath.Interactive"
For C#
#r "nuget:AngouriMath"
Note, that plotting API is only available in AngouriMath.Interactive.
AngouriMath Terminal
AngouriMath.Terminal is a TUI program to interact with AngouriMath without creating project/opening IDE/etc.,
basically using it as your own calculator. It is released with the library, from 2.6.0, and installs
the command amcli. With the .NET SDK, install it as a tool:
dotnet tool install --global AngouriMath.Terminal
Or choose the build for your OS:
| OS | x86 32-bit | x86 64-bit | ARM 32-bit | ARM 64-bit |
|---|---|---|---|---|
| Debian/Ubuntu | x64 ✅ | arm32 | arm64 | |
| Other Linux | x64 ✅ | arm32 | arm64 | |
| macOS | x64 | arm64 | ||
| Windows | x86 | x64 |
✅ - tested. If you'd like, you're welcome to test for another architecture
[ All options ]Run it:
For Debian/Ubuntu users
Go to the folder with the deb file you downloaded and runsudo apt install ./angourimath-terminal-your-arch.deb
Now you can invoke it with amcli or angourimath-terminal, or from your start up menu / application launcher.
For all others
Unzip the file you downloaded. Inside, there's an executable calledAngouriMath.Terminal for Linux/macOS users and AngouriMath.Terminal.exe for Windows users.
Wben it's running, it may take some time to start the kernel. Once started, you can type in F#. To verify it works, type:
solutions "x" "sin(x) = 1/2"
and type enter.
AngouriMath CLI
The standalone amcli is now the Terminal's: install the
AngouriMath Terminal, and with a command after it amcli answers
once and exits, without opening the terminal, so it can sit in a pipe or a script:
$ amcli simp "sin(x)^2 + cos(x)^2"
1
$ amcli solve x "x^2 - 1 = 0"
1
-1
$ echo "1 + x^2" | amcli diff x
2 * x
The commands are eval, simp, fsimp, diff,
solve, sub, latex and info, with the earlier tool's
names and argument order, and amcli help says what each takes. amcli mcp
serves the library to an LLM agent over the Model Context Protocol.
Install for C++ (experimental)
Consuming from C++ is available for CMake.
1. Here you need to add a language requirement:
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2. Add this fetcher before you add an executable:
include(FetchContent)
FetchContent_Declare(
AngouriMath
GIT_REPOSITORY https://github.com/asc-community/AngouriMathLab
GIT_TAG origin/cpp-release
)
FetchContent_MakeAvailable(AngouriMath)
3. Add this function (which copies the lib to the executable) after you add an executable:
angourimath_to_executable(${YOUR_EXECUTABLE_NAME})
See the example.
Hello, world!
To verify you have everything installed correctly, let us write a simple program, computing a derivative:
C# code:
using AngouriMath;
using System;
Entity expr = "x + sin(y x)";
Console.WriteLine(expr);
Console.WriteLine(expr.Differentiate("x"));
F# code:
open AngouriMath.FSharp.Core
open AngouriMath.FSharp.Functions
let expr = parsed "x + sin(y x)"
printf "%O" expr
printf "\n"
printf "%O" (derivative "x" expr)
Jupyter:
#r "nuget:AngouriMath.Interactive"
open AngouriMath.FSharp.Core
open AngouriMath.FSharp.Functions
let expr = parsed "x + sin(y x)"
derivative "x" expr
C++ code:
#include <iostream>
#include <AngouriMath.h>
AngouriMath::Entity expr = "x + sin(y x)";
std::cout << expr.Differentiate("x");
What's next?
You can check examples and wiki. We also recommend joining our Discord chat, so that we could help and you can give a feedback. The full documentation is in the almanac. The repository (with the source code) is on GitHub.
Angouri © 2019-2026 · Project's repo · Site's repo · Octicons · Transparency · 4970 pages online