#include void vecsqr(double *y,double *x, int *n_p) /* y[0:n-1] <- x[0:n-1]^2 */ { int i, n = *n_p; if (n < 1) Rprintf("vecsqr: error n = %d < 1\n", n); for (i=0; i < n; i++) y[i] = x[i]*x[i]; }