/* -------------------------------------------------------------------------- math.h includes some math routines which are not included as standard in ANSI. ---------------------------------------------------------------------------- */ extern double dmod(double top, double bottom); /* does a % of floating point numbers. If they are too big, it will fail. */ extern int* sort(float *values, int npts); /* sorts a list and returns an array of the positions of the sorted elements */ extern int* sort_m(float *values, int npts, float missing); /* same as sort, but allows missing values. The missing values are ignored, and only the non-missing values are sorted. The position array contains the same number of elements as values[], so the positions of the missing values are returned as -1. */ extern float max(float *values, int npts); /* returns the max of an array */ extern float min(float *values, int npts); /* returns the min of an array */ /*--------------------------------------------------------------------------- End of amath.h ---------------------------------------------------------------------------- */