X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=blobdiff_plain;f=common.h;h=7e0e86d7622da0698d992bdf94af0dfef3e4676e;hp=88ec865226297a1bcced0312bdd8c91a40febf82;hb=a602fc812857788265c72c27b132f34b9d7d107c;hpb=76f84179ceee1307c87a665a924abaeae8cb9f18 diff --git a/common.h b/common.h index 88ec865..7e0e86d 100644 --- a/common.h +++ b/common.h @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -31,6 +32,7 @@ double hypotD2plus(const double p[D3], const double q[D3], double add); double magnD(const double pq[D3]); void xprod(double r[D3], const double a[D3], const double b[D3]); +double dotprod(const double a[D3], const double b[D3]); void flushoutput(void); void diee(const char *what); @@ -49,6 +51,9 @@ void gsldie(int l, const char *what, int status); #define GSL_VECTOR(x) gsl_vector x##_gsl= { D3,1,&x[0] }; #define GSL_MATRIX(x) gsl_matrix x##_gsl= { D3,D3,D3,&x[0][0] }; +#define MIN(a,b) ((a) <= (b) ? (a) : (b)) +#define MAX(a,b) ((a) >= (b) ? (a) : (b)) + #ifdef FP_FAST_FMA # define fma_fast fma #else