How to start?
Arithmetica is a .NET library written in .NET standard. The nuget is up-to date with the stable version of the library. Let us see how to use it in a simple console application.
- Open Visual Studio (Preferred 2015 and above)
- Create a new .NET Core Console Project with name "SimpleMath"
- Once the project is created, right click on the project and select Manage Nuget Packages.
- Search for Arithmetica, click and install the latest version.
- Great, now open Program.cs and import the following namespace.
using Arithmetica.LinearAlgebra.Single;
- In the main function, implement the following code to perform two vector calculation.
//Create a float vector loaded with array
SingleVector a = SingleVector.LoadArray(1, 2, 3, 4, 5, 6);
//Create a float vector with constant value
SingleVector b = new SingleVector(6);
b.Fill(2.5f);
//Perform the math calculation y = sin(a) + exp(b)
SingleVector y = SingleVector.Sin(a) + SingleVector.Exp(b);
y.Print();
Now run the console to see the result.