chiark / gitweb /
do not use gsl_blas_dnrm2; instead just do addition and sqrt
authorIan Jackson <ian@davenant.relativity.greenend.org.uk>
Mon, 29 Sep 2008 00:33:57 +0000 (01:33 +0100)
committerIan Jackson <ian@davenant.relativity.greenend.org.uk>
Mon, 29 Sep 2008 00:33:57 +0000 (01:33 +0100)
common.c

index 3b036aaa29f54508a5708a1965347734dc5cfa5e..bfe11b7dc23851e0e427f45533a86d9df2f0b112 100644 (file)
--- a/common.c
+++ b/common.c
@@ -5,14 +5,7 @@
 #include "common.h"
 
 double magnD(const double pq[D3]) {
-  gsl_vector v;
-
-  v.size= D3;
-  v.stride= 1;
-  v.data= (double*)pq;
-  /* owner and block ought not to be used */
-
-  return gsl_blas_dnrm2(&v);
+  return sqrt(magnD2(pq));
 }
 
 double magnD2(const double pq[D3]) {