#include <math.h>
#define SQR(x) ((x)*(x))
#define FMAX(x,y) ((x)>(y)?(x):(y))
#define FMIN(x,y) ((x)<(y)?(x):(y))
#define SIGN(a,b) ((b)>=0.0 ? fabs(a) : -fabs(a))

void nrerror(const char error_text[]);
float *vector(int nl,int nh);
int *ivector(int nl,int nh);
double *dvector(int nl,int nh);
float **matrix(int nrl,int nrh,int ncl,int nch);
double **dmatrix(int nrl,int nrh,int ncl,int nch);
int **imatrix(int nrl,int nrh,int ncl,int nch);
void free_vector(float *v, int nl,int nh);
void free_ivector(int *v,int nl,int nh);
void free_dvector(double *v, int nl,int nh);
void free_matrix(float **m, int nrl,int nrh,int ncl,int nch);
void free_dmatrix(double **m, int nrl,int nrh,int ncl,int nch);
void free_imatrix(int **m, int nrl,int nrh,int ncl,int nch);
void free_submatrix(float **b, int nrl,int nrh,int ncl,int nch);
float **convert_matrix(float *a, int nrl,int nrh,int ncl,int nch);
void free_convert_matrix(float **b, int nrl,int nrh,int ncl,int nch);
