AngouriMath

Navigation

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
dotnet add package MyPackage
. Also here are a few instructions how to use NuGet from IDEs:

Install for C#

dotnet add package AngouriMath --prerelease

Install for F#

dotnet add package AngouriMath.FSharp --prerelease

Install nightly build

If you want to use the last version, pushed to master, you will need to add MyGet as a nuget package source:
https://www.myget.org/F/angourimath/api/v3/index.json
To add it, run
dotnet new nugetconfig
dotnet nuget add source https://www.myget.org/F/angourimath/api/v3/index.json
dotnet add package AngouriMath --prerelease



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, *-*"

Nightly builds

First, run this command:
#i "https://www.myget.org/F/angourimath/api/v3/index.json"
Then you can run the command to install the F# or C# version.

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. Choose the right link for your OS to down it:

OSx86 32-bitx86 64-bitARM 32-bitARM 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 run
sudo apt install ./angourimath-terminal-your-arch.deb
Now you can invoke it with `angourimath-terminal` or from your start up menu / application launcher.

For all others

Unzip the file you downloaded. Inside, there's an executable called AngouriMath.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


amcli is a Command Line Interface for AngouriMath. Although it is not as feature-rich, it may be useful for some automation scripts without the need to use AM library within .NET. It's lightweight and with negligible start up time. Choose the right link for your OS to down it:

OSx86 32-bitx86 64-bitARM 32-bitARM 64-bit
Debian/Ubuntu
Other Linux x64
macOS x64
Windows 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 run
sudo apt install ./amcli-your-arch.deb
Now you can invoke it with `amcli`.

For all others

Just run the executable. As for now, it has no side effects (it won't write anything to anywhere).

Run to get detailed help with examples:

amcli help



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 Core
open Functions
let expr = parse "x + sin(y x)"
printf "%O" expr
printf "\n"
printf "%O" (differentiate "x" expr)
Jupyter:
#r "nuget:AngouriMath.Interactive, *-*"
open Core
open Functions
let expr = parse "x + sin(y x)"
differentiate "x" expr
C++ code:
#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-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online