+double dotprod(const double a[D3], const double b[D3]) {
+ int k;
+ double result= 0;
+ K result += a[k] * b[k];
+ return result;
+}
+
+void libdie(const char *lib, int l, const char *str) {
+ fprintf(stderr,"%s library call failed, line %d: %s\n", lib, l, str);
+}
+
+void gsldie(int l, const char *what, int status) {
+ fprintf(stderr,"gsl function failed, line %d: %s: %s\n",
+ l, what, gsl_strerror(status));
+ exit(-1);
+}
+