code: public static float min(float[] x) {
          float m = Float.POSITIVE_INFINITY;
  
          for (float n : x) {
              if (n < m) {
                  m = n;
              }
          }
  
          return m;
      }
docs: Returns the minimum value of an array.