cpackl
testall(cpackl(0.0, -0.0), cpackl(1.0, -0.0), ALL_STD_EXCEPT, 0, 1);
testall(cpackl(-0.0, -0.0), cpackl(1.0, -0.0), ALL_STD_EXCEPT, 0, 1);
testall(cpackl(finites[i], NAN), cpackl(NAN, NAN),
testall(cpackl(NAN, finites[i]), cpackl(NAN, NAN),
testall(cpackl(NAN, 0.0), cpackl(NAN, 0.0), ALL_STD_EXCEPT, 0, 1);
testall(cpackl(NAN, -0.0), cpackl(NAN, -0.0), ALL_STD_EXCEPT, 0, 1);
testall(cpackl(INFINITY, NAN), cpackl(INFINITY, NAN),
testall(cpackl(-INFINITY, NAN), cpackl(0.0, 0.0),
testall(cpackl(NAN, NAN), cpackl(NAN, NAN),
testall(cpackl(finites[i], INFINITY), cpackl(NAN, NAN),
testall(cpackl(-INFINITY, M_PI_4), cpackl(0.0, 0.0),
testall(cpackl(-INFINITY, 3 * M_PI_4), cpackl(-0.0, 0.0),
testall(cpackl(-INFINITY, 5 * M_PI_4), cpackl(-0.0, -0.0),
testall(cpackl(-INFINITY, 7 * M_PI_4), cpackl(0.0, -0.0),
testall(cpackl(-INFINITY, 0.0), cpackl(0.0, 0.0),
testall(cpackl(-INFINITY, -0.0), cpackl(0.0, -0.0),
testall(cpackl(INFINITY, M_PI_4), cpackl(INFINITY, INFINITY),
testall(cpackl(INFINITY, 3 * M_PI_4), cpackl(-INFINITY, INFINITY),
testall(cpackl(INFINITY, 5 * M_PI_4), cpackl(-INFINITY, -INFINITY),
testall(cpackl(INFINITY, 7 * M_PI_4), cpackl(INFINITY, -INFINITY),
testall(cpackl(INFINITY, 0.0), cpackl(INFINITY, 0.0),
testall(cpackl(INFINITY, -0.0), cpackl(INFINITY, -0.0),
test(cexp, cpackl(finites[i], 0.0),
cpackl(exp(finites[i]), 0.0),
test(cexp, cpackl(finites[i], -0.0),
cpackl(exp(finites[i]), -0.0),
test(cexpf, cpackl(finites[i], 0.0),
cpackl(expf(finites[i]), 0.0),
test(cexpf, cpackl(finites[i], -0.0),
cpackl(expf(finites[i]), -0.0),
test(cexp, cpackl(0.0, finites[i]),
cpackl(cos(finites[i]), sin(finites[i])),
test(cexp, cpackl(-0.0, finites[i]),
cpackl(cos(finites[i]), sin(finites[i])),
test(cexpf, cpackl(0.0, finites[i]),
cpackl(cosf(finites[i]), sinf(finites[i])),
test(cexpf, cpackl(-0.0, finites[i]),
cpackl(cosf(finites[i]), sinf(finites[i])),
test_tol(cexp, cpackl(a, b), cpackl(x, y), 3 * DBL_ULP());
test_tol(cexpf, cpackl(a, b), cpackl(x, y), 1 * FLT_ULP());
test_tol(cexp, cpackl(709.79, 0x1p-1074),
cpackl(INFINITY, 8.94674309915433533273e-16), DBL_ULP());
test_tol(cexp, cpackl(1000, 0x1p-1074),
cpackl(INFINITY, 9.73344457300016401328e+110), DBL_ULP());
test_tol(cexp, cpackl(1400, 0x1p-1074),
cpackl(INFINITY, 5.08228858149196559681e+284), DBL_ULP());
test_tol(cexp, cpackl(900, 0x1.23456789abcdep-1020),
cpackl(INFINITY, 7.42156649354218408074e+83), DBL_ULP());
test_tol(cexp, cpackl(1300, 0x1.23456789abcdep-1020),
cpackl(INFINITY, 3.87514844965996756704e+257), DBL_ULP());
test_tol(cexpf, cpackl(88.73, 0x1p-149),
cpackl(INFINITY, 4.80265603e-07), 2 * FLT_ULP());
test_tol(cexpf, cpackl(90, 0x1p-149),
cpackl(INFINITY, 1.7101492622e-06f), 2 * FLT_ULP());
test_tol(cexpf, cpackl(192, 0x1p-149),
cpackl(INFINITY, 3.396809344e+38f), 2 * FLT_ULP());
test_tol(cexpf, cpackl(120, 0x1.234568p-120),
cpackl(INFINITY, 1.1163382522e+16f), 2 * FLT_ULP());
test_tol(cexpf, cpackl(170, 0x1.234568p-120),
cpackl(INFINITY, 5.7878851079e+37f), 2 * FLT_ULP());
assert(t_csqrt(cpackl(a, b)) == cpackl(x, y));
assert_equal(t_csqrt(cpackl(0.0, 0.0)), cpackl(0.0, 0.0));
assert_equal(t_csqrt(cpackl(-0.0, 0.0)), cpackl(0.0, 0.0));
assert_equal(t_csqrt(cpackl(0.0, -0.0)), cpackl(0.0, -0.0));
assert_equal(t_csqrt(cpackl(-0.0, -0.0)), cpackl(0.0, -0.0));
assert_equal(t_csqrt(cpackl(-INFINITY, vals[i])),
cpackl(0.0, copysignl(INFINITY, vals[i])));
assert_equal(t_csqrt(cpackl(INFINITY, vals[i])),
cpackl(INFINITY, copysignl(0.0, vals[i])));
assert_equal(t_csqrt(cpackl(vals[i], INFINITY)),
cpackl(INFINITY, INFINITY));
assert_equal(t_csqrt(cpackl(vals[i], -INFINITY)),
cpackl(INFINITY, -INFINITY));
assert(creall(t_csqrt(cpackl(INFINITY, NAN))) == INFINITY);
assert(isnan(cimagl(t_csqrt(cpackl(INFINITY, NAN)))));
assert(isnan(creall(t_csqrt(cpackl(-INFINITY, NAN)))));
assert(isinf(cimagl(t_csqrt(cpackl(-INFINITY, NAN)))));
assert_equal(t_csqrt(cpackl(NAN, INFINITY)),
cpackl(INFINITY, INFINITY));
assert_equal(t_csqrt(cpackl(NAN, -INFINITY)),
cpackl(INFINITY, -INFINITY));
assert_equal(t_csqrt(cpackl(0.0, NAN)), cpackl(NAN, NAN));
assert_equal(t_csqrt(cpackl(-0.0, NAN)), cpackl(NAN, NAN));
assert_equal(t_csqrt(cpackl(42.0, NAN)), cpackl(NAN, NAN));
assert_equal(t_csqrt(cpackl(-42.0, NAN)), cpackl(NAN, NAN));
assert_equal(t_csqrt(cpackl(NAN, 0.0)), cpackl(NAN, NAN));
assert_equal(t_csqrt(cpackl(NAN, -0.0)), cpackl(NAN, NAN));
assert_equal(t_csqrt(cpackl(NAN, 42.0)), cpackl(NAN, NAN));
assert_equal(t_csqrt(cpackl(NAN, -42.0)), cpackl(NAN, NAN));
assert_equal(t_csqrt(cpackl(NAN, NAN)), cpackl(NAN, NAN));
result = t_csqrt(cpackl(a, b));
long double complex zero = cpackl(0.0, 0.0);
testall_even(ccos, zero, cpackl(1.0, -0.0), ALL_STD_EXCEPT, 0, CS_BOTH);
long double complex nan_nan = cpackl(NAN, NAN);
z = cpackl(42, NAN);
z = cpackl(NAN, 42);
z = cpackl(NAN, INFINITY);
testall_odd(csin, z, cpackl(NAN, INFINITY), ALL_STD_EXCEPT, 0, 0);
testall_even(ccos, z, cpackl(INFINITY, NAN), ALL_STD_EXCEPT, 0,
testall_odd(ctan, z, cpackl(0, 1), ALL_STD_EXCEPT, 0, CS_IMAG);
z = cpackl(INFINITY, NAN);
testall_odd(csinh, z, cpackl(INFINITY, NAN), ALL_STD_EXCEPT, 0, 0);
testall_even(ccosh, z, cpackl(INFINITY, NAN), ALL_STD_EXCEPT, 0,
testall_odd(ctanh, z, cpackl(1, 0), ALL_STD_EXCEPT, 0, CS_REAL);
z = cpackl(0, NAN);
testall_odd(csinh, z, cpackl(0, NAN), ALL_STD_EXCEPT, 0, 0);
testall_even(ccosh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0);
testall_odd(csin, z, cpackl(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL);
testall_even(ccos, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0);
testall_odd(ctan, z, cpackl(0, NAN), ALL_STD_EXCEPT, 0, CS_REAL);
z = cpackl(NAN, 0);
testall_odd(csinh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG);
testall_even(ccosh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0);
testall_odd(ctanh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, CS_IMAG);
testall_odd(csin, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0);
testall_even(ccos, z, cpackl(NAN, 0), ALL_STD_EXCEPT, 0, 0);
z = cpackl(INFINITY, INFINITY);
testall_odd(csinh, z, cpackl(INFINITY, NAN),
testall_even(ccosh, z, cpackl(INFINITY, NAN),
testall_odd(ctanh, z, cpackl(1, 0), ALL_STD_EXCEPT, 0, CS_REAL);
testall_odd(csin, z, cpackl(NAN, INFINITY),
testall_even(ccos, z, cpackl(INFINITY, NAN),
testall_odd(ctan, z, cpackl(0, 1), ALL_STD_EXCEPT, 0, CS_REAL);
z = cpackl(INFINITY, finites[i]);
testall_odd(csinh, z, cpackl(c, s), OPT_INEXACT, 0, CS_BOTH);
testall_even(ccosh, z, cpackl(c, s), OPT_INEXACT, 0, CS_BOTH);
testall_odd(ctanh, z, cpackl(1, 0 * sin(finites[i] * 2)),
z = cpackl(finites[i], INFINITY);
testall_odd(csin, z, cpackl(s, c), OPT_INEXACT, 0, CS_BOTH);
testall_even(ccos, z, cpackl(c, -s), OPT_INEXACT, 0, CS_BOTH);
testall_odd(ctan, z, cpackl(0 * sin(finites[i] * 2), 1),
z = cpackl(0, INFINITY);
testall_odd(csinh, z, cpackl(0, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
testall_even(ccosh, z, cpackl(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0);
testall_odd(ctanh, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
z = cpackl(INFINITY, 0);
testall_odd(csin, z, cpackl(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0);
testall_even(ccos, z, cpackl(NAN, 0), ALL_STD_EXCEPT, FE_INVALID, 0);
testall_odd(ctan, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
z = cpackl(42, INFINITY);
testall_odd(csinh, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
testall_even(ccosh, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
testall_odd(ctanh, z, cpackl(NAN, NAN), OPT_INEXACT, FE_INVALID, 0);
z = cpackl(INFINITY, 42);
testall_odd(csin, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
testall_even(ccos, z, cpackl(NAN, NAN), ALL_STD_EXCEPT, FE_INVALID, 0);
testall_odd(ctan, z, cpackl(NAN, NAN), OPT_INEXACT, FE_INVALID, 0);
z = cpackl(nums[i], 0.0);
testall_odd_tol(csinh, z, cpackl(sinh(nums[i]), 0), 0);
testall_even_tol(ccosh, z, cpackl(cosh(nums[i]), 0), 0);
testall_odd_tol(ctanh, z, cpackl(tanh(nums[i]), 0), 1);
testall_odd_tol(csin, z, cpackl(sin(nums[i]),
testall_even_tol(ccos, z, cpackl(cos(nums[i]),
testall_odd_tol(ctan, z, cpackl(tan(nums[i]), 0), 1);
z = cpackl(0.0, nums[i]);
testall_odd_tol(csinh, z, cpackl(copysign(0, cos(nums[i])),
testall_even_tol(ccosh, z, cpackl(cos(nums[i]),
testall_odd_tol(ctanh, z, cpackl(0, tan(nums[i])), 1);
testall_odd_tol(csin, z, cpackl(0, sinh(nums[i])), 0);
testall_even_tol(ccos, z, cpackl(cosh(nums[i]), -0.0), 0);
testall_odd_tol(ctan, z, cpackl(0, tanh(nums[i])), 1);
z = cpackl(tests[i].a, tests[i].b);
cpackl(tests[i].sinh_a, tests[i].sinh_b), 1.1);
cpackl(tests[i].cosh_a, tests[i].cosh_b), 1.1);
cpackl(tests[i].tanh_a, tests[i].tanh_b), 1.1);
z = cpackl(21, 0.78539816339744830961566084581987572L);
cpackl(1.0, 1.14990445285871196133287617611468468e-18L), 1);
cpackl(1.0, 1.55622644822675930314266334585597964e-19L), 1);
z = cpackl(355, 0.78539816339744830961566084581987572L);
cpackl(1.0, 8.95257245135025991216632140458264468e-309L), 1);
z = cpackl(30, 0x1p1023L);
cpackl(1.0, -1.62994325413993477997492170229268382e-26L), 1);
z = cpackl(1, 0x1p1023L);
cpackl(0.878606311888306869546254022621986509L,
z = cpackl(710.6, 0.78539816339744830961566084581987572L);
cpackl(1.43917579766621073533185387499658944e308L,
cpackl(1.43917579766621073533185387499658944e308L,
z = cpackl(1500, 0.78539816339744830961566084581987572L);
testall_odd(csinh, z, cpackl(INFINITY, INFINITY), OPT_INEXACT,
testall_even(ccosh, z, cpackl(INFINITY, INFINITY), OPT_INEXACT,