mailr25282 - /trunk/target_functions/c_chi2.c


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 26, 2014 - 12:44:
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) {




Related Messages


Powered by MHonArc, Updated Tue Aug 26 13:00:02 2014