--- a/src/modules/bugs/functions/InProd.cc
+++ b/src/modules/bugs/functions/InProd.cc
@@ -1,6 +1,8 @@
 #include <config.h>
 #include <util/logical.h>
 #include "InProd.h"
+
+#include "lapack.h"
 
 using std::vector;
 
@@ -13,12 +15,8 @@
     void InProd::evaluate(double *x, vector<double const *> const &args,
 			  vector<unsigned int> const &lengths) const
     {
-	double svalue = 0;
-	for (unsigned int i = 0; i < lengths[0]; i++)
-	{
-	    svalue += args[0][i] * args[1][i];
-	}
-	*x = svalue;
+        int one = 1, N = lengths[0];
+        *x = F77_DDOT(&N, args[0], &one, args[1], &one);
     }
 
     bool