Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Math Libraries

  1. Jan 30, 2009 #1
    I used MATLAB a lot in school but it is very expensive and uses, a lot of resources and it isn't installed on most computers. MATLAB was originally built upon the math libraries:

    The MATLAB libraries were MATLAB later upgraded to LAPAC

    I believe the above libraries are available in both FORTRAN 90 and fortran 77. I swear I've looked at some FORTRAN90 which I swear has matrix operation syntax that has a very simmilar syntax to MATLAB.

    As I understand LAPAC can run very fast in certain systems:

    LAPAC has several versions:
    * http://en.wikipedia.org/w/index.php?title=Clapack&action=edit&redlink=1 [Broken] for C (especially useful if there is no Fortran Compiler available, as it is already preprocessed with f2c)
    * LAPACK++ for C++
    * http://en.wikipedia.org/w/index.php?title=Jlapack&action=edit&redlink=1 [Broken] for Java
    * http://en.wikipedia.org/w/index.php?title=HBlas&action=edit&redlink=1 [Broken] for Haskell
    * http://www.ocaml.info/home/ocaml_sources.html#LACAML [Broken] for OCaml
    * Boost uBLAS numerics bindings (http://svn.boost.org/svn/boost/sandbox/boost/numeric/bindings/ [Broken]) for C++.

    If your are not running a system which takes advantages of these optimizations then I believe that their are several advantages to these alternative LAPAC alternatives. The first is that Microsoft products tend to be built from C and C++ libraries. It is possible to build a DLL from FORTRAN source could but it is less common. Therefor tools will be harder to get to integrate FORTRAN with C. Additionally there are some internal differences that must be considered when interfacing C with FORTRAN


    The C implementation of LAPAC should be useful for anyone who does low level microprocessor stuff since C is low level and is the most common language available for microprocessors. The C implementation was created by using the f2c language translator. However, for low level stuff a C version of LINPAC may be preferable to a C version of LAPAC.

    http://people.sc.fsu.edu/~burkardt/f_src/lapack/lapack.html [Broken]

    Not being in school I don't do any microprocessor programing. I tend to do most programing in Microsoft office application. Specifically I now write most code as macros for excel and Access. I do this much more frequently then I use MATLAB.

    Macro's for Microsoft office applications are writen in visual basic. The reason I use visual basic more then MATLAB is most people have Microsoft Office while most people do not Have MATLAB. Even large engineering companies may be surprisingly limited on what software they have available.

    Now none of the above libraries I mentioned contain visual basic versions of the library. However, there is a JAVA version of the libraries. JAVA is nice because it is multi platform and generally not considered a security risk as it can be run in a sandbox. Or at least it is considered less of a security risk then compiled files (e.g. .exe .dll)

    Thus one clear alternative is to try and call JAVA from visual basic. The other is to convert the JAVA versions of the libraries to microsofts alternative to JAVA (AKA C#). Microsoft has the following tool available to convert JAVA to C#.

    Both C# and java are multiplatform but I suspect that C# is better integrated with Microsoft products. It is not as restrictive as JAVA. For instance pointers are allowed. Additional A C# compiler comes with every version of windows from windows XP and up.

    Given the availability of C# compiler and that it is well integrated with Microsoft products I'm learning towards converting the JAVA version of LAPAC to C# and using a C# version of the library for when I want to use math functionality that is beyond what is available in excel.

    The JAVA version of the library is available here:

    And here is a language comparison between JAVA and C#:
    Last edited by a moderator: May 4, 2017
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?