public static double absMax(double[] data,int off,int len){
  double max=Double.NaN;
  for (int i=off; i < off + len; i++) {
    if (Double.isNaN(data[i]))     continue;
    double abs=Math.abs(data[i]);
    if (Double.isNaN(max) || abs > max)     max=abs;
  }
  return max;
}

public static double absMax ( double [ ] data , int off , int len ) { double max = Double . NaN ; for ( int i = off ; i < off + len ; i ++ ) { if ( Double . isNaN ( data [ i ] ) ) continue ; double abs = Math . abs ( data [ i ] ) ; if ( Double . isNaN ( max ) || abs > max ) max = abs ; } return max ; }
find the maximum of the absolute values of all elements in the given subarray , ignoring elements that are nan .
