float max(float *values, int npts) { float maxval; int i; maxval = values[0]; for (i=1; i maxval) { maxval = values[i]; } } return maxval; }