Author: bugman
Date: Tue Aug 26 12:44:12 2014
New Revision: 25282

URL: http://svn.gna.org/viewcvs/relax?rev=25282&view=rev
Log:
Bug fix for the chi-squared gradient calculation in the C module.

The definition of the square() function needed extra brackets so that the 
1/error**2 calculation
would be 1/(error*error) rather than the incorrect 1/error*error form.


Modified:
    trunk/target_functions/c_chi2.c

Modified: trunk/target_functions/c_chi2.c
URL: 
http://svn.gna.org/viewcvs/relax/trunk/target_functions/c_chi2.c?rev=25282&r1=25281&r2=25282&view=diff
==============================================================================
--- trunk/target_functions/c_chi2.c     (original)
+++ trunk/target_functions/c_chi2.c     Tue Aug 26 12:44:12 2014
@@ -22,7 +22,7 @@
 #include "c_chi2.h"
 
 /* Define the function for calculating the square of a number. */
-#define square(x) (x)*(x)
+#define square(x) ((x)*(x))
 
 
 double chi2(double *values, double *sd, double *back_calc, int num_times) {


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
[email protected]

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to