aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2015-07-13 14:22:17 +0200
committerThomas White <taw@physics.org>2015-07-13 16:00:16 +0200
commitf801c63795f3abad546c240bc4c27032c3e3c785 (patch)
tree6d990e256efb977ff1156c1da9a0d5b20e7e06d6 /tests
parent65b952d9d99f1a6b3ecf353f6725065b616f5609 (diff)
Fix some warnings
Diffstat (limited to 'tests')
-rw-r--r--tests/pr_p_gradient_check.c4
-rw-r--r--tests/prediction_gradient_check.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/pr_p_gradient_check.c b/tests/pr_p_gradient_check.c
index 1ae7b049..17709741 100644
--- a/tests/pr_p_gradient_check.c
+++ b/tests/pr_p_gradient_check.c
@@ -320,12 +320,12 @@ static double test_gradients(Crystal *cr, double incr_val, int refine,
vec2[n_line] = grad;
n_line++;
- if ( (fabs(cgrad) < 5e-8) && (fabs(grad) < 5e-8) ) {
+ if ( (fabsl(cgrad) < 5e-8) && (fabsl(grad) < 5e-8) ) {
n_small++;
continue;
}
- total += fabs(cgrad - grad);
+ total += fabsl(cgrad - grad);
ntot++;
if ( !within_tolerance(grad, cgrad, 5.0)
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)