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

public static double min ( double [ ] a ) { double min = Double . POSITIVE_INFINITY ; for ( int i = 0 ; i < a . length ; i ++ ) { if ( Double . isNaN ( a [ i ] ) ) return Double . NaN ; if ( a [ i ] < min ) min = a [ i ] ; } return min ; }
returns the minimum value in the specified array .
