private static unsafe double maxabs(double[,] value)
{
int length = value.Length;
fixed (double* matrix = value)
{
double* p = matrix;
double max = System.Math.Abs(*p), d;
for (int i = 1; i < length; i++, p++)
{
d = System.Math.Abs(*p);
if (d > max) max = d;
}
return max;
}
}