From 9cb2010158b098d108ec10d6bf4fc9a8366c0df6 Mon Sep 17 00:00:00 2001 From: Enji Cooper Date: Wed, 16 Dec 2015 08:53:24 +0000 Subject: [PATCH] Use fabsl instead of fabs to mute -Wabsolute-value warnings from clang because `nums[]` is an array of long doubles MFC after: 1 week Sponsored by: EMC / Isilon Storage Division --- tools/regression/lib/msun/test-invctrig.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/regression/lib/msun/test-invctrig.c b/tools/regression/lib/msun/test-invctrig.c index 78b11197e814..34e78a16732b 100644 --- a/tools/regression/lib/msun/test-invctrig.c +++ b/tools/regression/lib/msun/test-invctrig.c @@ -281,21 +281,21 @@ test_axes(void) for (i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) { /* Real axis */ z = CMPLXL(nums[i], 0.0); - if (fabs(nums[i]) <= 1) { + if (fabsl(nums[i]) <= 1) { testall_tol(cacosh, z, CMPLXL(0.0, acos(nums[i])), 1); testall_tol(cacos, z, CMPLXL(acosl(nums[i]), -0.0), 1); testall_tol(casin, z, CMPLXL(asinl(nums[i]), 0.0), 1); testall_tol(catanh, z, CMPLXL(atanh(nums[i]), 0.0), 1); } else { testall_tol(cacosh, z, - CMPLXL(acosh(fabs(nums[i])), + CMPLXL(acosh(fabsl(nums[i])), (nums[i] < 0) ? pi : 0), 1); testall_tol(cacos, z, CMPLXL((nums[i] < 0) ? pi : 0, - -acosh(fabs(nums[i]))), 1); + -acosh(fabsl(nums[i]))), 1); testall_tol(casin, z, CMPLXL(copysign(pi / 2, nums[i]), - acosh(fabs(nums[i]))), 1); + acosh(fabsl(nums[i]))), 1); testall_tol(catanh, z, CMPLXL(atanh(1 / nums[i]), pi / 2), 1); }