Failed to give up

One reason I gave up on dynamatrix was the natrual log function failed.  I have fixed this bug.

In Expr.cs

case FXType.Ln: mi = typeof(Math).GetMethod(“Log”));

change to

case FXType.Ln: mi = typeof(Math).GetMethod(“Log”, new Type[]{typeof(double)});

The problem was that the program uses reflection to find the Log function in the math assembly, but there is an override, so two functions are available and an exception is thrown.  The extra code specifies that we want the override that does not specify a new base, that is, use the base e

Reflection is cool.

Given up on dynamatrix

Dynamatrix seems to be a good design, but the implementation is buggy, and I don’t have the inclination to fix and test it.  Perhaps just linking to a fortran library is the best bet.  Primitive types can be passed easily between the two, so that might do.  If I get really enthused, I might write a decent marshalling layer between Fortran and c#. I’ve done it before, but I don’t own the rights to the code.