#include <stdio.h>
#include <math.h>
#ifndef MAX
#define MAX(X,Y) ((X)>=(Y)?(X):(Y))
#endif
#ifndef MIN
#define MIN(X,Y) ((X)<=(Y)?(X):(Y))
#endif
extern double exp(double z);
extern double pow(double z,double y);
double ecall();
double eput();
double acall();
double aput();
double option();
void check_if_null(void *, char * , char *);

#define PRINTMATRIX(X,Y,Z,W)  {fprintf(stdout,#X"[%s]::",#Y); \
                           for(k=0;k<W;k++) { \
                             fprintf(stdout,"%6.3f ",Z[k]);\
                           }\
                           fprintf(stdout,"\n");fflush(stdout);}

#define NEWLINE  fprintf(stdout,"\n")

#define PRINTMAT3(X,Y,Z,W,B)  {fprintf(stdout,#X"[%s]::",#Y); \
                           for(k=0;k<W;k++) { \
                             fprintf(stdout,"%5.2f ",Z[B+k]);\
                           }\
                           fprintf(stdout,"\n");fflush(stdout);}

#define PRINTMAT(X,Y,Z,W)  {fprintf(stdout,#X"[%d]::",Y); \
                           for(k=0;k<W;k++) { \
                             fprintf(stdout,"%5.2f ",Z[k]);\
                           }\
                           fprintf(stdout,"\n");fflush(stdout);}

#define PRINTMAT2(X,Y,Z,W,B)  {fprintf(stdout,#X"[%d]::",Y); \
                           for(k=0;k<W;k++) { \
                             fprintf(stdout,"%5.2f ",Z[B+k]);\
                           }\
                           fprintf(stdout,"\n");fflush(stdout);}

#define OPTION_DEBUG
#define OPTION_DEBUG
#undef  OPTION_DEBUG
#define AMERICANOPTION_DEBUG
#undef  AMERICANOPTION_DEBUG
#define EUROPEANOPTION_DEBUG
#undef  EUROPEANOPTION_DEBUG
#define DOWNANDOUT
#undef  DOWNANDOUT
#define AMERICANCALL 1
#define AMERICANPUT  2
#define EUROPEANCALL 3
#define EUROPEANPUT  4
