#include void nrerror(char error_text[]) /* Numerical Recipes standard error handler */ { fprintf(stderr,"Numerical Recipes run-time error...\n"); fprintf(stderr,"%s\n",error_text); fprintf(stderr,"...now exiting to system...\n"); exit(1); } /* the function fmin() gives the minumum of a and b */ double fmin(double a, double b) { if(a < b) return a; else return b; } /* the function fmax() gives the maximum of a and b */ double fmax(double a, double b) { if(a > b) return a; else return b; } /* the function sign returns the magnitude of a times the sign of b */ double sign(double a, double b) { if( b >= 0.) return fabs(a); else return -fabs(a); }