r[2]= a[0]*b[1] - a[1]*b[0];
}
+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 diee(const char *what) { perror(what); exit(16); }
+void fail(const char *emsg) { fputs(emsg,stderr); exit(12); }
void flushoutput(void) { if (fflush(stdout)||ferror(stdout)) diee("stdout"); }