aboutsummaryrefslogtreecommitdiff
path: root/src/merge.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/merge.c')
-rw-r--r--src/merge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/merge.c b/src/merge.c
index 33567ecd..e56c3378 100644
--- a/src/merge.c
+++ b/src/merge.c
@@ -402,8 +402,8 @@ double residual(Crystal *cr, const RefList *full, int free,
w = 0.0;
}
- num += fabs(int1 - int2) * w;
- den += fabs(int1 + int2) * w/2.0;
+ num += w*fabs(int1 - int2)/((int1+int2)/2.0);
+ den += w;
n_used++;