The recommended way to get Math.NET Numerics is to use NuGet. The following packages are provided and maintained in the public [NuGet Gallery](https://nuget.org/profiles/mathnet/):
@ -21,16 +21,121 @@ The recommended way to get Math.NET Numerics is to use NuGet. The following pack
- **MathNet.Numerics.Signed** - strong-named version of the core package *(not recommended)*.
- **MathNet.Numerics.FSharp.Signed** - strong-named version of the F# package *(not recommended)*.
Supported Platforms:
- .Net 4.0, .Net 3.5 and Mono: Windows, Linux and Mac.
- PCL Portable Profiles 47 and 136: Silverlight 5, Windows Phone 8, .NET for Windows Store apps (Metro).
- PCL/Xamarin: Android, iOS *(not verified due to lack of license and devices)*
Alternatively you can also download the binaries in Zip packages, available on [CodePlex](http://mathnetnumerics.codeplex.com/releases):
- Binaries - core package and F# extensions, including .Net 4, .Net 3.5 and portable/PCL builds.
- Signed Binaries - strong-named version of the core package *(not recommended)*.
Supported Platforms:
- .Net 4.0, .Net 3.5 and Mono: Windows, Linux and Mac.
- PCL Portable Profiles 47 and 136: Silverlight 5, Windows Phone 8, .NET for Windows Store apps (Metro).
- PCL/Xamarin: Android, iOS *(not verified due to lack of license and devices)*
Using Math.NET Numerics with F#
-------------------------------
Even though the core of Math.NET Numerics is written in C#, it aims to support F#
just as well. In order to achieve this we recommend to reference the `MathNet.Numerics.FSharp`
package as well (in addition to `MathNet.Numerics`) which adds a few modules to make it more
idiomatic and includes arbitrary precision types (BigInteger, BigRational).
It also works well in the interactive F# environment (REPL) which can be launched with
`fsharpi` on all platforms (including Linux). As a start let's enter the following lines
into F# interactive. Each `;;` will cause the preceding lines to be executed immediately,
use the `Tab` key for auto-completion or `#help;;` for help.
[lang=fsharp]
#r "MathNet.Numerics.dll"
#r "MathNet.Numerics.FSharp.dll";;
open MathNet.Numerics;;
SpecialFunctions.Gamma(0.5);;
open MathNet.Numerics.LinearAlgebra;;
let m : Matrix<float> = DenseMatrix.randomStandard 50 50;;
(m * m.Transpose()).Determinant();;
Using Math.NET Numerics on Linux with Mono
------------------------------------------
You need a recent version of Mono in order to use Math.NET Numerics on anything other than Windows.
Luckily there has been great progress lately to make both Mono and F# available as proper Debian packages.
In Debian *testing* and Ubuntu *14.04 (trusty/universe)* you can install both of them with APT:
[lang=sh]
sudo apt-get update
sudo apt-get install mono-complete
sudo apt-get install fsharp
If you don't have NuGet yet:
[lang=sh]
sudo mozroots --import --sync
curl -L http://nuget.org/nuget.exe -o nuget.exe
Then you can use NuGet to fetch the latest binaries in your working directory.
The `-Pre` argument causes it to include pre-releases, omit it if you want stable releases only.