F# is emerging as a great choice for Numerical computing. Reasons? Functional design, libraries such as PowerPack, MathProvider and Math.NET and the interoperability of the .NET Framework.
F# PowerPack is a collection of libraries and tools for F# provided by Microsoft. It brings additional types, lexer and parser generation tools, document generator, enhancements to Async and Parallel capabilities and more. Tomas Petricek has written a series of articles on numeric types provided by PowerPack -
-
Introduction to Numeric Types
-
Working with Matrices in F#
-
Defining and working with Custom Numerics in F#
- Generic Numeric Code in F#
There is also a set of samples and tutorials on MSDN on the same topic.
Other libraries that are useful for dealing with Numerics in F# -
-
MathProvider brings linear algebra to F# by providing a wrapper for native BLAS and LAPACK runtimes.
-
Math.NET Numerics provides methods and algorithms for various scientific and engineering numeric computations, such as special functions, probability models, integral transforms, etc. MSDN has a tutorial on how to use Math.NET numerics in F#.
F# is often compared with other numerical computing languages like R and MATLAB. However, .NET applications can call both MATLAB and R and this allows F# to be used alongside special purpose languages to get the best of both worlds.