X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=moebius2.git;a=blobdiff_plain;f=common.h;h=7e0e86d7622da0698d992bdf94af0dfef3e4676e;hp=a64221318b1112a9f951e271f64bab2e179790de;hb=a602fc812857788265c72c27b132f34b9d7d107c;hpb=f5fef8bc75d9d5658705763fa7c083ae75a501ba diff --git a/common.h b/common.h index a642213..7e0e86d 100644 --- a/common.h +++ b/common.h @@ -15,6 +15,14 @@ #include #include #include +#include +#include +#include + +#include +#include +#include +#include #define D3 3 @@ -24,15 +32,28 @@ 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); +void libdie(const char *lib, int l, const char *str); +#define XA(w) ((w) ? (void)0 : libdie("X", __LINE__, #w)) + +void gsldie(int l, const char *what, int status); +#define GA(w) ({int _ga_r= (w); if (w) gsldie(__LINE__,#w,_ga_r);}) + #define FOR_COORD(k) \ for ((k)=0; (k)= (b) ? (a) : (b)) + #ifdef FP_FAST_FMA # define fma_fast fma #else