This project has moved. For the latest updates, please go here.

Meta.Numerics vs MathNet.Numerics ?

Apr 8, 2009 at 6:45 AM
Disclaimer: I am a contributor of Math.NET Numerics.

I have been looking at the content of Meta.Numerics, but almost the entire content (linear algebra, complex numbers, distributions ...) has been available for years in another open-source project called Math.NET (see ).

As far I can judge, Math.NET Numerics is nicely designed, documented and tested. Also, we have welcome happily 3rd party contributions in the past. Math.Net Numerics also contains FFT, interpolation, combinatorics.

Was there any particular reason to create another numerics package?

Best regards,
Joannes Vermorel
Founder at
Apr 8, 2009 at 7:48 AM
Hi Joannes, and thanks for taking the time to look and compare.

Math.NET is a nice package, and there is a great deal of overlap, although I think it's an exaggeration to call it almost-entire. As well as the FFT and interpolation APIs you mention, Math.NET defines some specialized numeric types, like Rationals and Quaternions, that Meta.Numerics does not. On the other hand, Meta.Numerics has specialized treatment for symmetric matrices and can compute complex eigenvectors as well as eigenvalues. It also handles various statistical tests, the representation of data with error bars, and fitting routines, as well as the multidimensional optimization routines that were required to enable this functionality. Meta.Numerics also includes some additional special functions, such as the Bessel functions, complex error functions, spherical harmonics, and families of orthogonal polynomials.

There are also important differences of style. The designers of Math.NET preferred to build elementary functions of complex numbers into the Complex type, so you write z.Cosine() to get cos(z). Meta.Numerics preferred to follow the pattern set by the System.Math class, so you write ComplexMath.Cos(z) to get cos(z). While Math.NET choose to keep its conceptual space simpler by treating row and column vectors the same, Meta.Numerics chose to distinguish between them, so that inner and outer products can be distinguished and so they can be cast to 1xN or Nx1 matrices. Finally, Meta.Numerics defines a very rich statistics object model that distinguishes between and embodies the relationships between Samples, UncertainValues, DataSets of UncertainValues, TestResults, FitResults, and so on.

As is always the case with personal software projects, personal interests and drive also played a role in my "rolling my own". I love this stuff and I wanted the chance to "learn by doing" and the chance to "put my own stamp" on its presentation. Since the project was not driven by the need for me to get some computation done (I have access to Matlab and Mathamatica, LAPACK and GSL, plenty of Perl and Java numerical libraries that could have done all that), but rather by my own passion for the material, I didn't look very hard at what else was on the market. By the time I was ready to release, I had learned of the commercial "extreme optimization" ( package, but I didn't learn of Math.NET until after my release. Given that history, it's interesting to see where there is overlap and where there is divergence.

Peace and good wishes,
Apr 23, 2009 at 10:51 PM
Hi David,

Thanks for the answer, it looks like you've put together a very decent numerics package. Being another Math.NET Iridium/Numerics contributor, I'm obviously very interested in alternative approaches and implementations. I'm currently working on our special functions toolkit and noticed that you indeed provide some special functions that some of our users have asked for and we'd like to support as well. Would you be willing to contribute (or dual-license to the LGPL license in addition to ms-pl) some excerpts of your code base to the Math.NET project?

Apr 27, 2009 at 8:31 AM
Hi Chris,

I appreciate your interest and your gracious request. Dev-to-dev, I wish I could give you a simple answer, but I'm afraid the situation isn't quite so simple.

I am the sole copyright holder to this code. I developed it on my own time, independent of my employer. I certainly have the legal right to license it any way I want.

That said, my employer is Microsoft, and I am interested in getting Microsoft to take some of this code into the .NET Framework. The framework team has shown interest. So even though I have the right to do whatever I want with the code, I have an interest in acting in a way that preserves Microsoft's interests. I asked Microsoft what I needed to do to preserve their interests, and I was told that it's fine to release the code under MS-PL. (That is, by the way, not new and radical -- Microsoft has released several WPF and ASP.NET controls developed for the .NET Framework under MS-PL.) I was also asked not accept code contributions from other developers. (Work items, even with very detailed algorithmic descriptions, are fine -- just no actual code.)

So for the time being I'm not going to go beyond those guidelines. You are, of course, absolutely welcome to do whatever MS-PL allows. (I'm not going to play "lawyer" and try to define exactly what that that is.) You have every legal right the MS-PL gives you and I have no ethical objections to your exercising them. I wish I could be more straightforwardly helpful, but for the time being the possibility of getting this stuff into the .NET Framework is my overriding concern. I hope you understand.

Thanks and good wishes,
May 1, 2009 at 9:39 PM
Hey guys,

First - big fan of both Math.Net and Meta.Numerics. I am using Math.Net in an open source project that we hope to release soon, but was also hoping to use Meta.Numerics' special functions in our project.

The target license for this project is LGPL. I'm not familiar enough with the terms of LGPL and MsPL - will I be able to link to MsPL libraries in my project, assuming I redistribute the license along with it?