#ifndef XLSDEF_H
#define XLSDEF_H

#ifndef _MC68881_
#define _MC68881_
#endif

#include <math.h>

#define realp(x) (floatp(x) || fixp(x))
#define Max(a,b)      (((a) > (b)) ? (a) : (b))
#define Min(a,b)      (((a) < (b)) ? (a) : (b))
#define nil 0L

typedef struct {
  double real, imag;
} Complex;

typedef char **Matrix, *Vector;   /* for this to be of use, probably assumes */
typedef int **IMatrix, *IVector;  /* int and double have same size?? JKL */
typedef double **RMatrix, *RVector;
typedef Complex **CMatrix, *CVector;

#define IN 0
#define RE 1
#define CX 2
 
#ifndef PI
#define PI 3.141592653589793
#endif PI

#define numberp(x) (floatp(x) || fixp(x))

#define numberp(x) (floatp(x) || fixp(x))
#define sequencep(x) (listp(x) || simplevectorp(x))
#define seqlen(x) ((listp(x)) ? llength(x) : getsize(x))

typedef struct {
  int n, m, k, itnlimit, backtrack, verbose, vals_suppl, exptilt;
  int count, termcode;
} MaxIPars;

typedef struct {
  double typf, h, gradtol, steptol, maxstep, dflt, tilt, newtilt, hessadd;
} MaxDPars;

typedef struct {
  MaxIPars max;
  int full, covar;
} MomIPars;

typedef struct {
  MaxDPars max;
  double mgfdel;
} MomDPars;

#endif XLSDEF_H
