Daily Download 13: The ALGLIB maths library and Excel

Today we move onto maths related downloads, starting with the ALGLIB maths library, which has featured here quite frequently:

Original post with link to site: ALGLIB

Installing AlgLib with Excel VBA
Download files: http://interactiveds.com.au/software/AL-Matrix-xlsb.zip   http://interactiveds.com.au/software/AL-Matrix-xls.zip

Linking AlgLib C++ to Excel VBA
Download file: http://interactiveds.com.au/software/AL-Matrixdll.zip

Compiled AlgLib Matrix Functions for Excel
Download file: http://interactiveds.com.au/software/AL-Matrixdll2.zip

ALGLIB Statistics Functions
Download file: http://interactiveds.com.au/software/AL-Stats.zip

AlgLib Complex Number Functions
Download file: http://interactiveds.com.au/software/AL-Complex.xls

AlgLib Spline Functions
2D Spline Interpolation with ALGLIB
Download files: http://interactiveds.com.au/software/AL-Spline-Matrix07.zip  http://interactiveds.com.au/software/AL-Spline-Matrix03.zip

Note that all the spreadsheets listed above link to Ver 2.6 of the ALGLIB library, which is the latest release in VBA.  At some stage I will link to later versions, which are available in C++, C#, VB.Net, and various flavours of Python, but the currently available VBA library remains a valuable resource, greatly extending the maths functionality available directly from Excel, and offering far better performance for maths intensive operations such as matrix functions.

Update Dec 2013:

Functions linking to the C# version of Alglib can be found at Compiled Matrix Functions for Excel; download file: http://www.interactiveds.com.au/software/Matrixdll-c%23.zip

For those wishing to use any of the ALGLIB routines in commercial applications, please read and observe the Licence Agreement

Matrix Functions

Matrix Functions

Statistics Functions

2D Spline Functions

This entry was posted in AlgLib, Arrays, Excel, Maths, Newton, Numerical integration, UDFs, VBA and tagged , , , , , , , . Bookmark the permalink.

7 Responses to Daily Download 13: The ALGLIB maths library and Excel

  1. Lee Townsend says:

    If you are interested in interpolation of FFT data, a good paper on the subject is “Fast Computation of Fourier Transform at Arbitrary Frequencies”, by Sudhakar, Agarwal, and Roy. IEEE Transactions on Circuits and Systems, Vol. CAS-28, NO. 10, October 1981, pp 972-980.

    Like

  2. You might find http://xlllapack.codeplex.com useful. In order to do high-performance numerical computing in Excel you need to use the FP data type, something only available in the C SDK. This project shows you how to call Fortran routines from the Intel MKL, It only takes a few lines of code to do this, unfortunately it is not obvious what those lines are. 😦

    Like

    • dougaj4 says:

      Hi Keith – I think saying “you need to use the FP data type” is putting it a bit strong. You can pass an array of doubles from VBA to C++ (or any other compiled language) without using the FP data type, in fact that’s what the VBA interfaces to the ALGLIB routines do. Does the FP data type have any advantages over using an array of doubles?

      Like

      • The FP data type actually has some disadvantages when compared to an array of doubles. It can be at most 2 dimensions and uses what Dennis Ritchie called “unwarranted chumminess with the compiler.” The method you are using requires an array in a spreadsheet to be copied to a VBA variant and the variant then copied to an array of doubles before you can call the native routine. Same story on the return trip.
        Using the FP data type and Excel SDK requires no copying whatsoever to pass the double pointer directly from Excel to a C++, or Fortran, routine.
        I’m really enjoying your blog. Keep up the good work!

        Like

  3. Pingback: Daily Download 22: Splines and Curves | Newton Excel Bach, not (just) an Excel Blog

  4. dougaj4 says:

    Thanks Keith – good summary (except, to be a bit picky, a VBA double array can be written directly to the spreadsheet in the same way as a variant array).

    Like

    • I like picky. It is an indicator someone is passionate and knowledgeable.
      Mad props to you on how far you can push the VBA side of Excel. I push the C SDK as far as it can go.
      So what’s the trick for getting the double* data returned by a call to an imported function back to Excel?
      I gave a talk about my add-in library at Alfred Vachris’ Excel meetup at the Microsoft office in New York. He turned me on to your blog. Glad he did because I am learing a lot.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.