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
This commit is contained in:
parent
106ebb761a
commit
9cb2010158
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=292327
@ -281,21 +281,21 @@ test_axes(void)
|
|||||||
for (i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) {
|
for (i = 0; i < sizeof(nums) / sizeof(nums[0]); i++) {
|
||||||
/* Real axis */
|
/* Real axis */
|
||||||
z = CMPLXL(nums[i], 0.0);
|
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(cacosh, z, CMPLXL(0.0, acos(nums[i])), 1);
|
||||||
testall_tol(cacos, z, CMPLXL(acosl(nums[i]), -0.0), 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(casin, z, CMPLXL(asinl(nums[i]), 0.0), 1);
|
||||||
testall_tol(catanh, z, CMPLXL(atanh(nums[i]), 0.0), 1);
|
testall_tol(catanh, z, CMPLXL(atanh(nums[i]), 0.0), 1);
|
||||||
} else {
|
} else {
|
||||||
testall_tol(cacosh, z,
|
testall_tol(cacosh, z,
|
||||||
CMPLXL(acosh(fabs(nums[i])),
|
CMPLXL(acosh(fabsl(nums[i])),
|
||||||
(nums[i] < 0) ? pi : 0), 1);
|
(nums[i] < 0) ? pi : 0), 1);
|
||||||
testall_tol(cacos, z,
|
testall_tol(cacos, z,
|
||||||
CMPLXL((nums[i] < 0) ? pi : 0,
|
CMPLXL((nums[i] < 0) ? pi : 0,
|
||||||
-acosh(fabs(nums[i]))), 1);
|
-acosh(fabsl(nums[i]))), 1);
|
||||||
testall_tol(casin, z,
|
testall_tol(casin, z,
|
||||||
CMPLXL(copysign(pi / 2, nums[i]),
|
CMPLXL(copysign(pi / 2, nums[i]),
|
||||||
acosh(fabs(nums[i]))), 1);
|
acosh(fabsl(nums[i]))), 1);
|
||||||
testall_tol(catanh, z,
|
testall_tol(catanh, z,
|
||||||
CMPLXL(atanh(1 / nums[i]), pi / 2), 1);
|
CMPLXL(atanh(1 / nums[i]), pi / 2), 1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user