Please review the matrix inversion instructions on the previous pages before blindly using any of the code on this page.

The JavaScript on this page is new. Unfortunately there's a bug somewhere that I haven't located (no time, actually) that prevents it from functioning all the time. I've probably just left out a parseFloat somewhere. I'd originally intended this function to also do the Moore-Penrose operation as well, but ran out of time.

The Java code is relatively new (within a few years). Unfortunately there are some problems still with Java that prevent me making it a true template like the C++ below. I do wish Java would take a lesson from Ada83 and allow for generics with default function arguments.

The C++ code is rather old. Written originally in 1992 and later converted to a template. I keep this source around for reference only, but haven't used it for years. When I originally wrote this I hadn't heard of the STL. Please don't judge my C++ by this example!

The C source is slightly modified from the original. I've added the transpose, product, and inverse steps defined in the text so that the code will do the Moore-Penrose solution, if needed.
The Fortran is worthless - as no respectable programmer would touch it. :-) If you really need it, I can probably find it - though it was pure Fortran77 and needed allocated memory supplied for the workspaces, as I recall.