aboutsummaryrefslogtreecommitdiff
path: root/tests/prediction_gradient_check.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/prediction_gradient_check.c')
-rw-r--r--tests/prediction_gradient_check.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/prediction_gradient_check.c b/tests/prediction_gradient_check.c
index c5d4206b..0ab8a2ec 100644
--- a/tests/prediction_gradient_check.c
+++ b/tests/prediction_gradient_check.c
@@ -326,12 +326,12 @@ static double test_gradients(Crystal *cr, double incr_val, int refine,
vec2[n_line] = grad;
n_line++;
- if ( (fabs(cgrad) < 5e-12) && (fabs(grad) < 5e-12) ) {
+ if ( (fabsl(cgrad) < 5e-12) && (fabsl(grad) < 5e-12) ) {
n_small++;
continue;
}
- total += fabs(cgrad - grad);
+ total += fabsl(cgrad - grad);
ntot++;
if ( !within_tolerance(grad, cgrad, 5.0)