double dot(int len, double* vec1, double* vec2);