public static double min(double[] data){
  double min=Double.NaN;
  for (int i=0; i < data.length; i++) {
    if (Double.isNaN(data[i]))     continue;
    if (Double.isNaN(min) || data[i] < min)     min=data[i];
  }
  return min;
}

public static double min ( double [ ] data ) { double min = Double . NaN ; for ( int i = 0 ; i < data . length ; i ++ ) { if ( Double . isNaN ( data [ i ] ) ) continue ; if ( Double . isNaN ( min ) || data [ i ] < min ) min = data [ i ] ; } return min ; }
find the minimum of all elements in the array , ignoring elements that are nan .
