X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=common.h;h=7e0e86d7622da0698d992bdf94af0dfef3e4676e;hb=a602fc812857788265c72c27b132f34b9d7d107c;hp=3978b5bc83ef8fa06bc3001276483831cf31beac;hpb=62710d55de09f02e31a9fc2cc7e3ec5de44651e4;p=moebius2.git diff --git a/common.h b/common.h index 3978b5b..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,6 +32,27 @@ 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