static const struct test_f_f_data acos_test_data[] =
{
- START_DATA (acos),
TEST_f_f (acos, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (acos, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (acos, qnan_value, qnan_value),
TEST_f_f (acos, 0x0.ffffffffffffffffp0L, 3.2927225399135962333718255320079907245059e-10L),
TEST_f_f (acos, -0x0.ffffffffffffffffp0L, 3.1415926532605209844712837599423203309964L),
#endif
- END_DATA (acos)
};
static void
static const struct test_f_f_data acos_tonearest_test_data[] =
{
- START_DATA (acos_tonearest),
TEST_f_f (acos, 0, M_PI_2l),
TEST_f_f (acos, minus_zero, M_PI_2l),
TEST_f_f (acos, 1, 0),
TEST_f_f (acos, -1, M_PIl),
TEST_f_f (acos, 0.5, M_PI_6l*2.0),
TEST_f_f (acos, -0.5, M_PI_6l*4.0),
- END_DATA (acos_tonearest)
};
static void
static const struct test_f_f_data acos_towardzero_test_data[] =
{
- START_DATA (acos_towardzero),
TEST_f_f (acos, 0, M_PI_2l),
TEST_f_f (acos, minus_zero, M_PI_2l),
TEST_f_f (acos, 1, 0),
TEST_f_f (acos, -1, M_PIl),
TEST_f_f (acos, 0.5, M_PI_6l*2.0),
TEST_f_f (acos, -0.5, M_PI_6l*4.0),
- END_DATA (acos_towardzero)
};
static void
static const struct test_f_f_data acos_downward_test_data[] =
{
- START_DATA (acos_downward),
TEST_f_f (acos, 0, M_PI_2l),
TEST_f_f (acos, minus_zero, M_PI_2l),
TEST_f_f (acos, 1, 0),
TEST_f_f (acos, -1, M_PIl),
TEST_f_f (acos, 0.5, M_PI_6l*2.0),
TEST_f_f (acos, -0.5, M_PI_6l*4.0),
- END_DATA (acos_downward)
};
static void
static const struct test_f_f_data acos_upward_test_data[] =
{
- START_DATA (acos_upward),
TEST_f_f (acos, 0, M_PI_2l),
TEST_f_f (acos, minus_zero, M_PI_2l),
TEST_f_f (acos, 1, 0),
TEST_f_f (acos, -1, M_PIl),
TEST_f_f (acos, 0.5, M_PI_6l*2.0),
TEST_f_f (acos, -0.5, M_PI_6l*4.0),
- END_DATA (acos_upward)
};
static void
static const struct test_f_f_data acosh_test_data[] =
{
- START_DATA (acosh),
TEST_f_f (acosh, plus_infty, plus_infty),
TEST_f_f (acosh, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (acosh, qnan_value, qnan_value),
TEST_f_f (acosh, 1, 0),
TEST_f_f (acosh, 7, 2.63391579384963341725009269461593689L),
- END_DATA (acosh)
};
static void
static const struct test_f_f_data asin_test_data[] =
{
- START_DATA (asin),
TEST_f_f (asin, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (asin, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (asin, qnan_value, qnan_value),
TEST_f_f (asin, 0x0.ffffffffffffffffp0L, 1.5707963264656243652399620683025688888978L),
TEST_f_f (asin, -0x0.ffffffffffffffffp0L, -1.5707963264656243652399620683025688888978L),
#endif
- END_DATA (asin)
};
static void
static const struct test_f_f_data asin_tonearest_test_data[] =
{
- START_DATA (asin_tonearest),
TEST_f_f (asin, 0, 0),
TEST_f_f (asin, minus_zero, minus_zero),
TEST_f_f (asin, 0.5, M_PI_6l),
TEST_f_f (asin, -0.5, -M_PI_6l),
TEST_f_f (asin, 1.0, M_PI_2l),
TEST_f_f (asin, -1.0, -M_PI_2l),
- END_DATA (asin_tonearest)
};
static void
static const struct test_f_f_data asin_towardzero_test_data[] =
{
- START_DATA (asin_towardzero),
TEST_f_f (asin, 0, 0),
TEST_f_f (asin, minus_zero, minus_zero),
TEST_f_f (asin, 0.5, M_PI_6l),
TEST_f_f (asin, -0.5, -M_PI_6l),
TEST_f_f (asin, 1.0, M_PI_2l),
TEST_f_f (asin, -1.0, -M_PI_2l),
- END_DATA (asin_towardzero)
};
static void
static const struct test_f_f_data asin_downward_test_data[] =
{
- START_DATA (asin_downward),
TEST_f_f (asin, 0, 0),
TEST_f_f (asin, minus_zero, minus_zero),
TEST_f_f (asin, 0.5, M_PI_6l),
TEST_f_f (asin, -0.5, -M_PI_6l),
TEST_f_f (asin, 1.0, M_PI_2l),
TEST_f_f (asin, -1.0, -M_PI_2l),
- END_DATA (asin_downward)
};
static void
static const struct test_f_f_data asin_upward_test_data[] =
{
- START_DATA (asin_upward),
TEST_f_f (asin, 0, 0),
TEST_f_f (asin, minus_zero, minus_zero),
TEST_f_f (asin, 0.5, M_PI_6l),
TEST_f_f (asin, -0.5, -M_PI_6l),
TEST_f_f (asin, 1.0, M_PI_2l),
TEST_f_f (asin, -1.0, -M_PI_2l),
- END_DATA (asin_upward)
};
static void
static const struct test_f_f_data asinh_test_data[] =
{
- START_DATA (asinh),
TEST_f_f (asinh, 0, 0),
TEST_f_f (asinh, minus_zero, minus_zero),
#ifndef TEST_INLINE
#endif
TEST_f_f (asinh, qnan_value, qnan_value),
TEST_f_f (asinh, 0.75L, 0.693147180559945309417232121458176568L),
- END_DATA (asinh)
};
static void
static const struct test_f_f_data atan_test_data[] =
{
- START_DATA (atan),
TEST_f_f (atan, 0, 0),
TEST_f_f (atan, minus_zero, minus_zero),
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_f_f (atan, 0x1p-10000L, 0x1p-10000L),
#endif
- END_DATA (atan)
};
static void
static const struct test_f_f_data atanh_test_data[] =
{
- START_DATA (atanh),
TEST_f_f (atanh, 0, 0),
TEST_f_f (atanh, minus_zero, minus_zero),
TEST_f_f (atanh, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (atanh, 0.75L, 0.972955074527656652552676371721589865L),
- END_DATA (atanh)
};
static void
static const struct test_ff_f_data atan2_test_data[] =
{
- START_DATA (atan2),
/* atan2 (0,x) == 0 for x > 0. */
TEST_ff_f (atan2, 0, 1, 0),
#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
TEST_ff_f (atan2, 0x1.00000000000001p0L, 0x1.00000000000001p0L, M_PI_4l),
#endif
- END_DATA (atan2)
};
static void
static const struct test_c_f_data cabs_test_data[] =
{
- START_DATA (cabs);
/* cabs (x + iy) is specified as hypot (x,y) */
/* cabs (+inf + i x) == +inf. */
TEST_c_f (cabs, 5.7e7L, 0, 5.7e7L),
TEST_c_f (cabs, 0.75L, 1.25L, 1.45773797371132511771853821938639577L),
- END_DATA (cabs);
};
static void
static const struct test_c_c_data cacos_test_data[] =
{
- START_DATA (cacos),
TEST_c_c (cacos, 0, 0, M_PI_2l, minus_zero),
TEST_c_c (cacos, minus_zero, 0, M_PI_2l, minus_zero),
TEST_c_c (cacos, minus_zero, minus_zero, M_PI_2l, 0.0),
TEST_c_c (cacos, 0.75L, 1.25L, 1.11752014915610270578240049553777969L, -1.13239363160530819522266333696834467L),
TEST_c_c (cacos, -2, -3, 2.1414491111159960199416055713254211L, 1.9833870299165354323470769028940395L),
- END_DATA (cacos)
};
static void
static const struct test_c_c_data cacosh_test_data[] =
{
- START_DATA (cacosh),
TEST_c_c (cacosh, 0, 0, 0.0, M_PI_2l),
TEST_c_c (cacosh, minus_zero, 0, 0.0, M_PI_2l),
TEST_c_c (cacosh, 0, minus_zero, 0.0, -M_PI_2l),
TEST_c_c (cacosh, 0.75L, 1.25L, 1.13239363160530819522266333696834467L, 1.11752014915610270578240049553777969L),
TEST_c_c (cacosh, -2, -3, 1.9833870299165354323470769028940395L, -2.1414491111159960199416055713254211L),
- END_DATA (cacosh)
};
static void
static const struct test_c_f_data carg_test_data[] =
{
- START_DATA (carg);
/* carg (x + iy) is specified as atan2 (y, x) */
/* carg (x + i 0) == 0 for x > 0. */
TEST_c_f (carg, minus_infty, minus_infty, -M_PI_34l),
TEST_c_f (carg, qnan_value, qnan_value, qnan_value),
- END_DATA (carg);
};
static void
static const struct test_c_c_data casin_test_data[] =
{
- START_DATA (casin),
TEST_c_c (casin, 0, 0, 0.0, 0.0),
TEST_c_c (casin, minus_zero, 0, minus_zero, 0.0),
TEST_c_c (casin, 0, minus_zero, 0.0, minus_zero),
TEST_c_c (casin, 0.75L, 1.25L, 0.453276177638793913448921196101971749L, 1.13239363160530819522266333696834467L),
TEST_c_c (casin, -2, -3, -0.57065278432109940071028387968566963L, -1.9833870299165354323470769028940395L),
- END_DATA (casin)
};
static void
static const struct test_c_c_data casinh_test_data[] =
{
- START_DATA (casinh),
TEST_c_c (casinh, 0, 0, 0.0, 0.0),
TEST_c_c (casinh, minus_zero, 0, minus_zero, 0),
TEST_c_c (casinh, 0, minus_zero, 0.0, minus_zero),
TEST_c_c (casinh, 0.75L, 1.25L, 1.03171853444778027336364058631006594L, 0.911738290968487636358489564316731207L),
TEST_c_c (casinh, -2, -3, -1.9686379257930962917886650952454982L, -0.96465850440760279204541105949953237L),
- END_DATA (casinh)
};
static void
static const struct test_c_c_data catan_test_data[] =
{
- START_DATA (catan),
TEST_c_c (catan, 0, 0, 0, 0),
TEST_c_c (catan, minus_zero, 0, minus_zero, 0),
TEST_c_c (catan, 0, minus_zero, 0, minus_zero),
TEST_c_c (catan, 0.75L, 1.25L, 1.10714871779409050301706546017853704L, 0.549306144334054845697622618461262852L),
TEST_c_c (catan, -2, -3, -1.4099210495965755225306193844604208L, -0.22907268296853876629588180294200276L),
- END_DATA (catan)
};
static void
static const struct test_c_c_data catanh_test_data[] =
{
- START_DATA (catanh),
TEST_c_c (catanh, 0, 0, 0.0, 0.0),
TEST_c_c (catanh, minus_zero, 0, minus_zero, 0.0),
TEST_c_c (catanh, 0, minus_zero, 0.0, minus_zero),
TEST_c_c (catanh, 0.75L, 1.25L, 0.261492138795671927078652057366532140L, 0.996825126463918666098902241310446708L),
TEST_c_c (catanh, -2, -3, -0.14694666622552975204743278515471595L, -1.3389725222944935611241935759091443L),
- END_DATA (catanh)
};
static void
static const struct test_f_f_data cbrt_test_data[] =
{
- START_DATA (cbrt),
TEST_f_f (cbrt, 0.0, 0.0),
TEST_f_f (cbrt, minus_zero, minus_zero),
TEST_f_f (cbrt, -27.0, -3.0),
TEST_f_f (cbrt, 0.9921875L, 0.997389022060725270579075195353955217L),
TEST_f_f (cbrt, 0.75L, 0.908560296416069829445605878163630251L),
- END_DATA (cbrt)
};
static void
static const struct test_c_c_data ccos_test_data[] =
{
- START_DATA (ccos),
TEST_c_c (ccos, 0.0, 0.0, 1.0, minus_zero),
TEST_c_c (ccos, minus_zero, 0.0, 1.0, 0.0),
TEST_c_c (ccos, 0.0, minus_zero, 1.0, 0.0),
TEST_c_c (ccos, min_subnorm_value * 0x1p120, 0x1p-120, 1.0, -min_subnorm_value, UNDERFLOW_EXCEPTION),
TEST_c_c (ccos, 0x1p-120, min_subnorm_value * 0x1p120, 1.0, -min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (ccos)
};
static void
static const struct test_c_c_data ccosh_test_data[] =
{
- START_DATA (ccosh),
TEST_c_c (ccosh, 0.0, 0.0, 1.0, 0.0),
TEST_c_c (ccosh, minus_zero, 0.0, 1.0, minus_zero),
TEST_c_c (ccosh, 0.0, minus_zero, 1.0, minus_zero),
TEST_c_c (ccosh, min_subnorm_value * 0x1p120, 0x1p-120, 1.0, min_subnorm_value, UNDERFLOW_EXCEPTION),
TEST_c_c (ccosh, 0x1p-120, min_subnorm_value * 0x1p120, 1.0, min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (ccosh)
};
static void
static const struct test_f_f_data ceil_test_data[] =
{
- START_DATA (ceil),
TEST_f_f (ceil, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_f_f (ceil, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_f_f (ceil, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (ceil, 10141204801825835211973625643008.75L, 10141204801825835211973625643009.0L),
TEST_f_f (ceil, 10141204801825835211973625643009.5L, 10141204801825835211973625643010.0L),
#endif
- END_DATA (ceil)
};
static void
static const struct test_c_c_data cexp_test_data[] =
{
- START_DATA (cexp),
TEST_c_c (cexp, plus_zero, plus_zero, 1, 0.0),
TEST_c_c (cexp, minus_zero, plus_zero, 1, 0.0),
TEST_c_c (cexp, plus_zero, minus_zero, 1, minus_zero),
TEST_c_c (cexp, min_value, min_subnorm_value, 1.0, min_subnorm_value, UNDERFLOW_EXCEPTION),
TEST_c_c (cexp, min_value, -min_subnorm_value, 1.0, -min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (cexp)
};
static void
static const struct test_c_f_data cimag_test_data[] =
{
- START_DATA (cimag);
TEST_c_f (cimag, 1.0, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 1.0, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 1.0, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 1.0, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 1.0, minus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_c_f (cimag, 2.0, 3.0, 3.0, NO_INEXACT_EXCEPTION),
- END_DATA (cimag);
};
static void
static const struct test_c_c_data clog_test_data[] =
{
- START_DATA (clog),
TEST_c_c (clog, minus_zero, 0, minus_infty, M_PIl, DIVIDE_BY_ZERO_EXCEPTION),
TEST_c_c (clog, minus_zero, minus_zero, minus_infty, -M_PIl, DIVIDE_BY_ZERO_EXCEPTION),
TEST_c_c (clog, 0xdb85c467ee2aadd5f425fe0f4b8dp-114L, 0x3e83162a0f95f1dcbf97dddf410eap-114L, 4.6017338806965821566734340588575402712716e-67L, 1.3547418904611758959096647942223384691728L),
TEST_c_c (clog, 0x1415bcaf2105940d49a636e98ae59p-115L, 0x7e6a150adfcd1b0921d44b31f40f4p-115L, 2.5993421227864195179698176012564317527271e-67L, 1.4132318089683022770487383611430906982461L),
#endif
- END_DATA (clog)
};
static void
static const struct test_c_c_data clog10_test_data[] =
{
- START_DATA (clog10),
TEST_c_c (clog10, minus_zero, 0, minus_infty, M_PIl, DIVIDE_BY_ZERO_EXCEPTION),
TEST_c_c (clog10, minus_zero, minus_zero, minus_infty, -M_PIl, DIVIDE_BY_ZERO_EXCEPTION),
TEST_c_c (clog10, 0xdb85c467ee2aadd5f425fe0f4b8dp-114L, 0x3e83162a0f95f1dcbf97dddf410eap-114L, 1.9985076315737626043096596036300177494613e-67L, 0.5883569274304683249184005177865521205198L),
TEST_c_c (clog10, 0x1415bcaf2105940d49a636e98ae59p-115L, 0x7e6a150adfcd1b0921d44b31f40f4p-115L, 1.1288799405048268615023706955013387413519e-67L, 0.6137587762850841972073301550420510507903L),
#endif
- END_DATA (clog10)
};
static void
static const struct test_c_c_data conj_test_data[] =
{
- START_DATA (conj),
TEST_c_c (conj, 0.0, 0.0, 0.0, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, 0.0, minus_zero, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, qnan_value, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, plus_infty, plus_infty, plus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, 1.0, 2.0, 1.0, -2.0, NO_INEXACT_EXCEPTION),
TEST_c_c (conj, 3.0, -4.0, 3.0, 4.0, NO_INEXACT_EXCEPTION),
- END_DATA (conj)
};
static void
static const struct test_ff_f_data copysign_test_data[] =
{
- START_DATA (copysign),
TEST_ff_f (copysign, 0, 4, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, 0, -4, minus_zero, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, minus_zero, 4, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, qnan_value, minus_zero, qnan_value, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, -qnan_value, 0, qnan_value, NO_INEXACT_EXCEPTION),
TEST_ff_f (copysign, -qnan_value, minus_zero, qnan_value, NO_INEXACT_EXCEPTION),
- END_DATA (copysign)
};
static void
static const struct test_f_f_data cos_test_data[] =
{
- START_DATA (cos),
TEST_f_f (cos, 0, 1),
TEST_f_f (cos, minus_zero, 1),
TEST_f_f (cos, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (cos, 0x1.fffffep+127, 8.53021039830304158051791467692161107353094e-01L),
TEST_f_f (cos, 0x1p+50, 8.68095904660550604334592502063501320395739e-01L),
TEST_f_f (cos, 0x1p+28, -1.65568979490578758865468278195361551113358e-01L),
- END_DATA (cos)
};
static void
static const struct test_f_f_data cos_tonearest_test_data[] =
{
- START_DATA (cos_tonearest),
TEST_f_f (cos, 1, 0.5403023058681397174009366074429766037323L),
TEST_f_f (cos, 2, -0.4161468365471423869975682295007621897660L),
TEST_f_f (cos, 3, -0.9899924966004454572715727947312613023937L),
TEST_f_f (cos, 8, -0.1455000338086135258688413818311946826093L),
TEST_f_f (cos, 9, -0.9111302618846769883682947111811653112463L),
TEST_f_f (cos, 10, -0.8390715290764524522588639478240648345199L),
- END_DATA (cos_tonearest)
};
static void
static const struct test_f_f_data cos_towardzero_test_data[] =
{
- START_DATA (cos_towardzero),
TEST_f_f (cos, 1, 0.5403023058681397174009366074429766037323L),
TEST_f_f (cos, 2, -0.4161468365471423869975682295007621897660L),
TEST_f_f (cos, 3, -0.9899924966004454572715727947312613023937L),
TEST_f_f (cos, 8, -0.1455000338086135258688413818311946826093L),
TEST_f_f (cos, 9, -0.9111302618846769883682947111811653112463L),
TEST_f_f (cos, 10, -0.8390715290764524522588639478240648345199L),
- END_DATA (cos_towardzero)
};
static void
static const struct test_f_f_data cos_downward_test_data[] =
{
- START_DATA (cos_downward),
TEST_f_f (cos, 1, 0.5403023058681397174009366074429766037323L),
TEST_f_f (cos, 2, -0.4161468365471423869975682295007621897660L),
TEST_f_f (cos, 3, -0.9899924966004454572715727947312613023937L),
TEST_f_f (cos, 8, -0.1455000338086135258688413818311946826093L),
TEST_f_f (cos, 9, -0.9111302618846769883682947111811653112463L),
TEST_f_f (cos, 10, -0.8390715290764524522588639478240648345199L),
- END_DATA (cos_downward)
};
static void
static const struct test_f_f_data cos_upward_test_data[] =
{
- START_DATA (cos_upward),
TEST_f_f (cos, 1, 0.5403023058681397174009366074429766037323L),
TEST_f_f (cos, 2, -0.4161468365471423869975682295007621897660L),
TEST_f_f (cos, 3, -0.9899924966004454572715727947312613023937L),
TEST_f_f (cos, 8, -0.1455000338086135258688413818311946826093L),
TEST_f_f (cos, 9, -0.9111302618846769883682947111811653112463L),
TEST_f_f (cos, 10, -0.8390715290764524522588639478240648345199L),
- END_DATA (cos_upward)
};
static void
static const struct test_f_f_data cosh_test_data[] =
{
- START_DATA (cosh),
TEST_f_f (cosh, 0, 1),
TEST_f_f (cosh, minus_zero, 1),
TEST_f_f (cosh, 709.8893558127259666434838436543941497802734375L, 9.9999998999995070652573675944761818416035e+307L),
TEST_f_f (cosh, -709.8893558127259666434838436543941497802734375L, 9.9999998999995070652573675944761818416035e+307L),
#endif
- END_DATA (cosh)
};
static void
static const struct test_f_f_data cosh_tonearest_test_data[] =
{
- START_DATA (cosh_tonearest),
TEST_f_f (cosh, 22, 1792456423.065795780980053377632656584997L),
TEST_f_f (cosh, 23, 4872401723.124451300068625740569997090344L),
TEST_f_f (cosh, 24, 13244561064.92173614708845674912733665919L),
- END_DATA (cosh_tonearest)
};
static void
static const struct test_f_f_data cosh_towardzero_test_data[] =
{
- START_DATA (cosh_towardzero),
TEST_f_f (cosh, 22, 1792456423.065795780980053377632656584997L),
TEST_f_f (cosh, 23, 4872401723.124451300068625740569997090344L),
TEST_f_f (cosh, 24, 13244561064.92173614708845674912733665919L),
- END_DATA (cosh_towardzero)
};
static void
static const struct test_f_f_data cosh_downward_test_data[] =
{
- START_DATA (cosh_downward),
TEST_f_f (cosh, 22, 1792456423.065795780980053377632656584997L),
TEST_f_f (cosh, 23, 4872401723.124451300068625740569997090344L),
TEST_f_f (cosh, 24, 13244561064.92173614708845674912733665919L),
- END_DATA (cosh_downward)
};
static void
static const struct test_f_f_data cosh_upward_test_data[] =
{
- START_DATA (cosh_upward),
TEST_f_f (cosh, 22, 1792456423.065795780980053377632656584997L),
TEST_f_f (cosh, 23, 4872401723.124451300068625740569997090344L),
TEST_f_f (cosh, 24, 13244561064.92173614708845674912733665919L),
- END_DATA (cosh_upward)
};
static void
static const struct test_cc_c_data cpow_test_data[] =
{
- START_DATA (cpow),
TEST_cc_c (cpow, 1, 0, 0, 0, 1.0, 0.0),
TEST_cc_c (cpow, 2, 0, 10, 0, 1024.0, 0.0),
TEST_cc_c (cpow, 0.75L, 1.25L, 1.0L, 1.0L, 0.0846958290317209430433805274189191353L, 0.513285749182902449043287190519090481L),
TEST_cc_c (cpow, 0.75L, 1.25L, 1.0L, 0.0L, 0.75L, 1.25L),
TEST_cc_c (cpow, 0.75L, 1.25L, 0.0L, 1.0L, 0.331825439177608832276067945276730566L, 0.131338600281188544930936345230903032L),
- END_DATA (cpow)
};
static void
static const struct test_c_c_data cproj_test_data[] =
{
- START_DATA (cproj),
TEST_c_c (cproj, 0.0, 0.0, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_c (cproj, minus_zero, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_c (cproj, 0.0, minus_zero, 0.0, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_c (cproj, 1.0, 0.0, 1.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_c (cproj, 2.0, 3.0, 2.0, 3.0, NO_INEXACT_EXCEPTION),
- END_DATA (cproj)
};
static void
static const struct test_c_f_data creal_test_data[] =
{
- START_DATA (creal);
TEST_c_f (creal, 0.0, 1.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, minus_zero, 1.0, minus_zero, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, qnan_value, 1.0, qnan_value, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, plus_infty, 1.0, plus_infty, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, minus_infty, 1.0, minus_infty, NO_INEXACT_EXCEPTION),
TEST_c_f (creal, 2.0, 3.0, 2.0, NO_INEXACT_EXCEPTION),
- END_DATA (creal);
};
static void
static const struct test_c_c_data csin_test_data[] =
{
- START_DATA (csin),
TEST_c_c (csin, 0.0, 0.0, 0.0, 0.0),
TEST_c_c (csin, minus_zero, 0.0, minus_zero, 0.0),
TEST_c_c (csin, 0.0, minus_zero, 0, minus_zero),
TEST_c_c (csin, min_subnorm_value, min_value, min_subnorm_value, min_value, UNDERFLOW_EXCEPTION),
TEST_c_c (csin, min_value, min_subnorm_value, min_value, min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (csin)
};
static void
static const struct test_c_c_data csinh_test_data[] =
{
- START_DATA (csinh),
TEST_c_c (csinh, 0.0, 0.0, 0.0, 0.0),
TEST_c_c (csinh, minus_zero, 0.0, minus_zero, 0.0),
TEST_c_c (csinh, 0.0, minus_zero, 0.0, minus_zero),
TEST_c_c (csinh, min_subnorm_value, min_value, min_subnorm_value, min_value, UNDERFLOW_EXCEPTION),
TEST_c_c (csinh, min_value, min_subnorm_value, min_value, min_subnorm_value, UNDERFLOW_EXCEPTION),
- END_DATA (csinh)
};
static void
static const struct test_c_c_data csqrt_test_data[] =
{
- START_DATA (csqrt),
TEST_c_c (csqrt, 0, 0, 0.0, 0.0),
TEST_c_c (csqrt, 0, minus_zero, 0, minus_zero),
TEST_c_c (csqrt, minus_zero, 0, 0.0, 0.0),
TEST_c_c (csqrt, -0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-16382L, 8.344545284118961663847948339519226074126e-2467L, -2.014551439675644900022606748976158925145e-2466L),
# endif
#endif
- END_DATA (csqrt)
};
static void
static const struct test_c_c_data ctan_test_data[] =
{
- START_DATA (ctan),
TEST_c_c (ctan, 0, 0, 0.0, 0.0),
TEST_c_c (ctan, 0, minus_zero, 0.0, minus_zero),
TEST_c_c (ctan, minus_zero, 0, minus_zero, 0.0),
TEST_c_c (ctan, 50000, -50000, plus_zero, -1.0, UNDERFLOW_EXCEPTION),
TEST_c_c (ctan, -50000, 50000, minus_zero, 1.0, UNDERFLOW_EXCEPTION),
TEST_c_c (ctan, -50000, -50000, minus_zero, -1.0, UNDERFLOW_EXCEPTION),
- END_DATA (ctan)
};
static void
static const struct test_c_c_data ctan_tonearest_test_data[] =
{
- START_DATA (ctan_tonearest),
TEST_c_c (ctan, 0x1.921fb6p+0, 0x1p-149, -2.287733242885645987394874673945769518150e7L, 7.334008549954377778731880988481078535821e-31L),
#ifndef TEST_FLOAT
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctan, 0x1.921fb54442d1846ap+0L, 0x1p-16445L, -3.986797629811710706723242948653362815645e19L, 5.793882568875674066286163141055208625180e-4912L),
#endif
- END_DATA (ctan_tonearest)
};
static void
static const struct test_c_c_data ctan_towardzero_test_data[] =
{
- START_DATA (ctan_towardzero),
TEST_c_c (ctan, 0x1.921fb6p+0, 0x1p-149, -2.287733242885645987394874673945769518150e7L, 7.334008549954377778731880988481078535821e-31L),
#ifndef TEST_FLOAT
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctan, 0x1.921fb54442d1846ap+0L, 0x1p-16445L, -3.986797629811710706723242948653362815645e19L, 5.793882568875674066286163141055208625180e-4912L),
#endif
- END_DATA (ctan_towardzero)
};
static void
static const struct test_c_c_data ctan_downward_test_data[] =
{
- START_DATA (ctan_downward),
TEST_c_c (ctan, 0x1.921fb6p+0, 0x1p-149, -2.287733242885645987394874673945769518150e7L, 7.334008549954377778731880988481078535821e-31L),
#ifndef TEST_FLOAT
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctan, 0x1.921fb54442d1846ap+0L, 0x1p-16445L, -3.986797629811710706723242948653362815645e19L, 5.793882568875674066286163141055208625180e-4912L),
#endif
- END_DATA (ctan_downward)
};
static void
static const struct test_c_c_data ctan_upward_test_data[] =
{
- START_DATA (ctan_upward),
TEST_c_c (ctan, 0x1.921fb6p+0, 0x1p-149, -2.287733242885645987394874673945769518150e7L, 7.334008549954377778731880988481078535821e-31L),
#ifndef TEST_FLOAT
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctan, 0x1.921fb54442d1846ap+0L, 0x1p-16445L, -3.986797629811710706723242948653362815645e19L, 5.793882568875674066286163141055208625180e-4912L),
#endif
- END_DATA (ctan_upward)
};
static void
static const struct test_c_c_data ctanh_test_data[] =
{
- START_DATA (ctanh),
TEST_c_c (ctanh, 0, 0, 0.0, 0.0),
TEST_c_c (ctanh, 0, minus_zero, 0.0, minus_zero),
TEST_c_c (ctanh, minus_zero, 0, minus_zero, 0.0),
TEST_c_c (ctanh, 50000, -50000, 1.0, minus_zero, UNDERFLOW_EXCEPTION),
TEST_c_c (ctanh, -50000, 50000, -1.0, plus_zero, UNDERFLOW_EXCEPTION),
TEST_c_c (ctanh, -50000, -50000, -1.0, minus_zero, UNDERFLOW_EXCEPTION),
- END_DATA (ctanh)
};
static void
static const struct test_c_c_data ctanh_tonearest_test_data[] =
{
- START_DATA (ctanh_tonearest),
TEST_c_c (ctanh, 0x1p-149, 0x1.921fb6p+0, 7.334008549954377778731880988481078535821e-31L, -2.287733242885645987394874673945769518150e7L),
#ifndef TEST_FLOAT
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctanh, 0x1p-16445L, 0x1.921fb54442d1846ap+0L, 5.793882568875674066286163141055208625180e-4912L, -3.986797629811710706723242948653362815645e19L),
#endif
- END_DATA (ctanh_tonearest)
};
static void
static const struct test_c_c_data ctanh_towardzero_test_data[] =
{
- START_DATA (ctanh_towardzero),
TEST_c_c (ctanh, 0x1p-149, 0x1.921fb6p+0, 7.334008549954377778731880988481078535821e-31L, -2.287733242885645987394874673945769518150e7L),
#ifndef TEST_FLOAT
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctanh, 0x1p-16445L, 0x1.921fb54442d1846ap+0L, 5.793882568875674066286163141055208625180e-4912L, -3.986797629811710706723242948653362815645e19L),
#endif
- END_DATA (ctanh_towardzero)
};
static void
static const struct test_c_c_data ctanh_downward_test_data[] =
{
- START_DATA (ctanh_downward),
TEST_c_c (ctanh, 0x1p-149, 0x1.921fb6p+0, 7.334008549954377778731880988481078535821e-31L, -2.287733242885645987394874673945769518150e7L),
#ifndef TEST_FLOAT
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctanh, 0x1p-16445L, 0x1.921fb54442d1846ap+0L, 5.793882568875674066286163141055208625180e-4912L, -3.986797629811710706723242948653362815645e19L),
#endif
- END_DATA (ctanh_downward)
};
static void
static const struct test_c_c_data ctanh_upward_test_data[] =
{
- START_DATA (ctanh_upward),
TEST_c_c (ctanh, 0x1p-149, 0x1.921fb6p+0, 7.334008549954377778731880988481078535821e-31L, -2.287733242885645987394874673945769518150e7L),
#ifndef TEST_FLOAT
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_c_c (ctanh, 0x1p-16445L, 0x1.921fb54442d1846ap+0L, 5.793882568875674066286163141055208625180e-4912L, -3.986797629811710706723242948653362815645e19L),
#endif
- END_DATA (ctanh_upward)
};
static void
static const struct test_f_f_data erf_test_data[] =
{
- START_DATA (erf),
TEST_f_f (erf, 0, 0),
TEST_f_f (erf, minus_zero, minus_zero),
TEST_f_f (erf, plus_infty, 1),
TEST_f_f (erf, 2.0L, 0.995322265018952734162069256367252929L),
TEST_f_f (erf, 4.125L, 0.999999994576599200434933994687765914L),
TEST_f_f (erf, 27.0L, 1.0L),
- END_DATA (erf)
};
static void
static const struct test_f_f_data erfc_test_data[] =
{
- START_DATA (erfc),
TEST_f_f (erfc, plus_infty, 0.0),
TEST_f_f (erfc, minus_infty, 2.0),
TEST_f_f (erfc, 0.0, 1.0),
TEST_f_f (erfc, 0x1.ffff56789abcdef0123456789a8p+2L, 1.123161416304655390092138725253789378459e-29L),
# endif
#endif
- END_DATA (erfc)
};
static void
static const struct test_f_f_data exp_test_data[] =
{
- START_DATA (exp),
TEST_f_f (exp, 0, 1),
TEST_f_f (exp, minus_zero, 1),
TEST_f_f (exp, 1e5, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (exp, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (exp, -max_value, 0, UNDERFLOW_EXCEPTION),
- END_DATA (exp)
};
static void
static const struct test_f_f_data exp_tonearest_test_data[] =
{
- START_DATA (exp_tonearest),
TEST_f_f (exp, 1, M_El),
TEST_f_f (exp, 2, M_E2l),
TEST_f_f (exp, 3, M_E3l),
- END_DATA (exp_tonearest)
};
static void
static const struct test_f_f_data exp_towardzero_test_data[] =
{
- START_DATA (exp_towardzero),
TEST_f_f (exp, 1, M_El),
TEST_f_f (exp, 2, M_E2l),
TEST_f_f (exp, 3, M_E3l),
- END_DATA (exp_towardzero)
};
static void
static const struct test_f_f_data exp_downward_test_data[] =
{
- START_DATA (exp_downward),
TEST_f_f (exp, 1, M_El),
TEST_f_f (exp, 2, M_E2l),
TEST_f_f (exp, 3, M_E3l),
- END_DATA (exp_downward)
};
static void
static const struct test_f_f_data exp_upward_test_data[] =
{
- START_DATA (exp_upward),
TEST_f_f (exp, 1, M_El),
TEST_f_f (exp, 2, M_E2l),
TEST_f_f (exp, 3, M_E3l),
- END_DATA (exp_upward)
};
static void
static const struct test_f_f_data exp10_test_data[] =
{
- START_DATA (exp10),
TEST_f_f (exp10, 0, 1),
TEST_f_f (exp10, minus_zero, 1),
TEST_f_f (exp10, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (exp10, -max_value, 0, UNDERFLOW_EXCEPTION),
TEST_f_f (exp10, 0.75L, 5.62341325190349080394951039776481231L),
- END_DATA (exp10)
};
static void
static const struct test_f_f_data exp2_test_data[] =
{
- START_DATA (exp2),
TEST_f_f (exp2, 0, 1),
TEST_f_f (exp2, minus_zero, 1),
TEST_f_f (exp2, plus_infty, plus_infty),
TEST_f_f (exp2, 16383, 0x1p16383L),
TEST_f_f (exp2, -16400, 0x1p-16400L),
#endif
- END_DATA (exp2)
};
static void
static const struct test_f_f_data expm1_test_data[] =
{
- START_DATA (expm1),
TEST_f_f (expm1, 0, 0),
TEST_f_f (expm1, minus_zero, minus_zero),
TEST_f_f (expm1, 100000.0, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (expm1, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (expm1, -max_value, -1),
- END_DATA (expm1)
};
static void
static const struct test_f_f_data fabs_test_data[] =
{
- START_DATA (fabs),
TEST_f_f (fabs, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_f (fabs, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_f (fabs, 38.0, 38.0, NO_INEXACT_EXCEPTION),
TEST_f_f (fabs, -M_El, M_El, NO_INEXACT_EXCEPTION),
- END_DATA (fabs)
};
static void
static const struct test_ff_f_data fdim_test_data[] =
{
- START_DATA (fdim),
TEST_ff_f (fdim, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (fdim, 9, 0, 9, NO_INEXACT_EXCEPTION),
TEST_ff_f (fdim, 0, 9, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (fdim, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
TEST_ff_f (fdim, plus_infty, plus_infty, 0, NO_INEXACT_EXCEPTION),
- END_DATA (fdim)
};
static void
static const struct test_f_i_data finite_test_data[] =
{
- START_DATA (finite),
TEST_f_b (finite, 0, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (finite, minus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (finite, 10, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (finite, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (finite, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (finite, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (finite)
};
static void
static const struct test_f_f_data floor_test_data[] =
{
- START_DATA (floor),
TEST_f_f (floor, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_f_f (floor, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_f_f (floor, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (floor, 0xf.ffffffffffffff8p+47L, 0xf.fffffffffffep+47L),
TEST_f_f (floor, -0x8.000000000000004p+48L, -0x8.000000000001p+48L),
#endif
- END_DATA (floor)
};
static void
static const struct test_fff_f_data fma_test_data[] =
{
- START_DATA (fma),
TEST_fff_f (fma, 1.0, 2.0, 3.0, 5.0),
TEST_fff_f (fma, qnan_value, 2.0, 3.0, qnan_value),
TEST_fff_f (fma, 1.0, qnan_value, 3.0, qnan_value),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, 0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
#endif
- END_DATA (fma)
};
static void
static const struct test_fff_f_data fma_towardzero_test_data[] =
{
- START_DATA (fma_towardzero),
TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, plus_zero),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, 0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x0.ffffffffffffffffffffffffffff8p16319L),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
#endif
- END_DATA (fma_towardzero)
};
static void
static const struct test_fff_f_data fma_downward_test_data[] =
{
- START_DATA (fma_downward),
TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, minus_zero),
TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, minus_zero),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, 0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1.0000000000000000000000000001p16319L),
#endif
- END_DATA (fma_downward)
};
static void
static const struct test_fff_f_data fma_upward_test_data[] =
{
- START_DATA (fma_upward),
TEST_fff_f (fma, plus_zero, plus_zero, plus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, plus_zero, minus_zero, plus_zero),
TEST_fff_f (fma, plus_zero, minus_zero, plus_zero, plus_zero),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, 0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x0.ffffffffffffffffffffffffffff8p16319L),
TEST_fff_f (fma, 0x1.0000000000000000000000000001p-16382L, -0x1.0000000000000000000000000001p-66L, -0x1p16319L, -0x1p16319L),
#endif
- END_DATA (fma_upward)
};
static void
static const struct test_ff_f_data fmax_test_data[] =
{
- START_DATA (fmax),
TEST_ff_f (fmax, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, 9, 0, 9, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, qnan_value, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, qnan_value, minus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmax, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
- END_DATA (fmax)
};
static void
static const struct test_ff_f_data fmin_test_data[] =
{
- START_DATA (fmin),
TEST_ff_f (fmin, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, minus_zero, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, 9, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, qnan_value, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, qnan_value, minus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_ff_f (fmin, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
- END_DATA (fmin)
};
static void
static const struct test_ff_f_data fmod_test_data[] =
{
- START_DATA (fmod),
/* fmod (+0, y) == +0 for y != 0. */
TEST_ff_f (fmod, 0, 3, 0, NO_INEXACT_EXCEPTION),
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
TEST_ff_f (fmod, 0x0.fffffffffffffffep-16382L, 0x1p-16445L, plus_zero, NO_INEXACT_EXCEPTION),
#endif
- END_DATA (fmod)
};
static void
static const struct test_f_i_data fpclassify_test_data[] =
{
- START_DATA (fpclassify),
TEST_f_i (fpclassify, qnan_value, FP_NAN, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, plus_infty, FP_INFINITE, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, minus_infty, FP_INFINITE, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, minus_zero, FP_ZERO, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, 1000, FP_NORMAL, NO_INEXACT_EXCEPTION),
TEST_f_i (fpclassify, min_subnorm_value, FP_SUBNORMAL, NO_INEXACT_EXCEPTION),
- END_DATA (fpclassify)
};
static void
static const struct test_f_f1_data frexp_test_data[] =
{
- START_DATA (frexp),
TEST_fI_f1 (frexp, plus_infty, plus_infty, IGNORE, NO_INEXACT_EXCEPTION),
TEST_fI_f1 (frexp, minus_infty, minus_infty, IGNORE, NO_INEXACT_EXCEPTION),
TEST_fI_f1 (frexp, qnan_value, qnan_value, IGNORE, NO_INEXACT_EXCEPTION),
TEST_fI_f1 (frexp, 12.8L, 0.8L, 4, NO_INEXACT_EXCEPTION),
TEST_fI_f1 (frexp, -27.34L, -0.854375L, 5, NO_INEXACT_EXCEPTION),
- END_DATA (frexp)
};
static void
static const struct test_f_f1_data gamma_test_data[] =
{
- START_DATA (gamma),
TEST_f_f1 (gamma, plus_infty, plus_infty, 1),
TEST_f_f1 (gamma, 0, plus_infty, 1, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f1 (gamma, -3, plus_infty, IGNORE, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f1 (gamma, 0.5, M_LOG_SQRT_PIl, 1),
TEST_f_f1 (gamma, -0.5, M_LOG_2_SQRT_PIl, -1),
- END_DATA (gamma)
};
static void
static const struct test_ff_f_data hypot_test_data[] =
{
- START_DATA (hypot),
TEST_ff_f (hypot, plus_infty, 1, plus_infty),
TEST_ff_f (hypot, minus_infty, 1, plus_infty),
#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 && !defined TEST_INLINE
TEST_ff_f (hypot, 0x3p16381L, 0x4p16381L, 0x5p16381L),
#endif
- END_DATA (hypot)
};
static void
static const struct test_f_i_data ilogb_test_data[] =
{
- START_DATA (ilogb),
TEST_f_i (ilogb, 1, 0, NO_INEXACT_EXCEPTION),
TEST_f_i (ilogb, M_El, 1, NO_INEXACT_EXCEPTION),
TEST_f_i (ilogb, 1024, 10, NO_INEXACT_EXCEPTION),
TEST_f_i (ilogb, plus_infty, INT_MAX, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
/* ilogb (-inf) == INT_MAX plus invalid exception */
TEST_f_i (ilogb, minus_infty, INT_MAX, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
- END_DATA (ilogb)
};
static void
static const struct test_f_i_data isfinite_test_data[] =
{
- START_DATA (isfinite),
TEST_f_b (isfinite, 0, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, minus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, 10, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isfinite, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isfinite)
};
static void
static const struct test_ff_i_data isgreater_test_data[] =
{
- START_DATA (isgreater),
TEST_ff_i (isgreater, minus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, minus_zero, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, minus_zero, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreater, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isgreater)
};
static void
static const struct test_ff_i_data isgreaterequal_test_data[] =
{
- START_DATA (isgreaterequal),
TEST_ff_i (isgreaterequal, minus_zero, minus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, minus_zero, plus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, minus_zero, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isgreaterequal, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isgreaterequal)
};
static void
static const struct test_f_i_data isinf_test_data[] =
{
- START_DATA (isinf),
TEST_f_b (isinf, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, 10, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, plus_infty, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, minus_infty, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isinf, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isinf)
};
static void
static const struct test_ff_i_data isless_test_data[] =
{
- START_DATA (isless),
TEST_ff_i (isless, minus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, minus_zero, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, minus_zero, (FLOAT) 1, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isless, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isless)
};
static void
static const struct test_ff_i_data islessequal_test_data[] =
{
- START_DATA (islessequal),
TEST_ff_i (islessequal, minus_zero, minus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, minus_zero, plus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, minus_zero, (FLOAT) 1, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessequal, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (islessequal)
};
static void
static const struct test_ff_i_data islessgreater_test_data[] =
{
- START_DATA (islessgreater),
TEST_ff_i (islessgreater, minus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, minus_zero, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, minus_zero, (FLOAT) 1, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, qnan_value, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, qnan_value, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (islessgreater, qnan_value, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (islessgreater)
};
static void
static const struct test_f_i_data isnan_test_data[] =
{
- START_DATA (isnan),
TEST_f_b (isnan, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, 10, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnan, qnan_value, 1, NO_INEXACT_EXCEPTION),
- END_DATA (isnan)
};
static void
static const struct test_f_i_data isnormal_test_data[] =
{
- START_DATA (isnormal),
TEST_f_b (isnormal, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, 10, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (isnormal, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (isnormal)
};
static void
static const struct test_f_i_data issignaling_test_data[] =
{
- START_DATA (issignaling),
TEST_f_b (issignaling, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, 10, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, plus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, minus_infty, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (issignaling, qnan_value, 0, NO_INEXACT_EXCEPTION),
- END_DATA (issignaling)
};
static void
static const struct test_ff_i_data isunordered_test_data[] =
{
- START_DATA (isunordered),
TEST_ff_i (isunordered, minus_zero, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, minus_zero, plus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, minus_zero, (FLOAT) 1, 0, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, qnan_value, plus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, qnan_value, (FLOAT) 1, 1, NO_INEXACT_EXCEPTION),
TEST_ff_i (isunordered, qnan_value, qnan_value, 1, NO_INEXACT_EXCEPTION),
- END_DATA (isunordered)
};
static void
static const struct test_f_f_data j0_test_data[] =
{
- START_DATA (j0),
/* j0 is the Bessel function of the first kind of order 0 */
TEST_f_f (j0, qnan_value, qnan_value),
TEST_f_f (j0, plus_infty, 0),
TEST_f_f (j0, 0x1p16382L, -1.2193782500509000574176799046642541129387e-2466L),
TEST_f_f (j0, 0x1p16383L, 9.5859502826270374691362975419147645151233e-2467L),
#endif
- END_DATA (j0)
};
static void
static const struct test_f_f_data j1_test_data[] =
{
- START_DATA (j1),
/* j1 is the Bessel function of the first kind of order 1 */
TEST_f_f (j1, qnan_value, qnan_value),
TEST_f_f (j1, plus_infty, 0),
TEST_f_f (j1, 0x1p16382L, 8.0839224448726336195866026476176740513439e-2467L),
TEST_f_f (j1, 0x1p16383L, -3.8895531955766020648617743624167352352217e-2467L),
#endif
- END_DATA (j1)
};
static void
static const struct test_if_f_data jn_test_data[] =
{
- START_DATA (jn),
/* jn is the Bessel function of the first kind of order n. */
/* jn (0, x) == j0 (x) */
TEST_if_f (jn, 0, qnan_value, qnan_value),
/* Bug 14155: spurious exception may occur. */
TEST_if_f (jn, 2, 0x1.ffff62p+99L, -4.43860668048170034334926693188979974489e-16L, UNDERFLOW_EXCEPTION_OK),
- END_DATA (jn)
};
static void
static const struct test_fi_f_data ldexp_test_data[] =
{
- START_DATA (ldexp),
TEST_fi_f (ldexp, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_fi_f (ldexp, minus_zero, 0, minus_zero, NO_INEXACT_EXCEPTION),
/* ldexp (x, 0) == x. */
TEST_fi_f (ldexp, 1.0L, 0L, 1.0L, NO_INEXACT_EXCEPTION),
- END_DATA (ldexp)
};
static void
static const struct test_f_f1_data lgamma_test_data[] =
{
- START_DATA (lgamma),
TEST_f_f1 (lgamma, plus_infty, plus_infty, 1),
TEST_f_f1 (lgamma, 0, plus_infty, 1, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f1 (lgamma, minus_zero, plus_infty, -1, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f1 (lgamma, -0.5, M_LOG_2_SQRT_PIl, -1),
TEST_f_f1 (lgamma, 0.7L, 0.260867246531666514385732417016759578L, 1),
TEST_f_f1 (lgamma, 1.2L, -0.853740900033158497197028392998854470e-1L, 1),
- END_DATA (lgamma)
};
static void
static const struct test_f_l_data lrint_test_data[] =
{
- START_DATA (lrint),
/* XXX this test is incomplete. We need to have a way to specifiy
the rounding method and test the critical cases. So far, only
unproblematic numbers are tested. */
TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint)
};
static void
static const struct test_f_l_data lrint_tonearest_test_data[] =
{
- START_DATA (lrint_tonearest),
TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint_tonearest)
};
static void
static const struct test_f_l_data lrint_towardzero_test_data[] =
{
- START_DATA (lrint_towardzero),
TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint_towardzero)
};
static void
static const struct test_f_l_data lrint_downward_test_data[] =
{
- START_DATA (lrint_downward),
TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, 0.2L, 0, INEXACT_EXCEPTION),
TEST_f_l (lrint, 281474976710656.025L, 281474976710656, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint_downward)
};
static void
static const struct test_f_l_data lrint_upward_test_data[] =
{
- START_DATA (lrint_upward),
TEST_f_l (lrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_l (lrint, 0.2L, 1, INEXACT_EXCEPTION),
TEST_f_l (lrint, 281474976710656.025L, 281474976710657, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (lrint_upward)
};
static void
static const struct test_f_L_data llrint_test_data[] =
{
- START_DATA (llrint),
/* XXX this test is incomplete. We need to have a way to specifiy
the rounding method and test the critical cases. So far, only
unproblematic numbers are tested. */
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint)
};
static void
static const struct test_f_L_data llrint_tonearest_test_data[] =
{
- START_DATA (llrint_tonearest),
TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint_tonearest)
};
static void
static const struct test_f_L_data llrint_towardzero_test_data[] =
{
- START_DATA (llrint_towardzero),
TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint_towardzero)
};
static void
static const struct test_f_L_data llrint_downward_test_data[] =
{
- START_DATA (llrint_downward),
TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, 0.2L, 0, INEXACT_EXCEPTION),
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint_downward)
};
static void
static const struct test_f_L_data llrint_upward_test_data[] =
{
- START_DATA (llrint_upward),
TEST_f_L (llrint, 0.0, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, minus_zero, 0, NO_INEXACT_EXCEPTION),
TEST_f_L (llrint, 0.2L, 1, INEXACT_EXCEPTION),
TEST_f_L (llrint, -9223372036854775807.0L, -9223372036854775807LL, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (llrint_upward)
};
static void
static const struct test_f_f_data log_test_data[] =
{
- START_DATA (log),
TEST_f_f (log, 0, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log, 2, M_LN2l),
TEST_f_f (log, 10, M_LN10l),
TEST_f_f (log, 0.75L, -0.287682072451780927439219005993827432L),
- END_DATA (log)
};
static void
static const struct test_f_f_data log10_test_data[] =
{
- START_DATA (log10),
TEST_f_f (log10, 0, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log10, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log10, 10000.0, 4),
TEST_f_f (log10, M_El, M_LOG10El),
TEST_f_f (log10, 0.75L, -0.124938736608299953132449886193870744L),
- END_DATA (log10)
};
static void
static const struct test_f_f_data log1p_test_data[] =
{
- START_DATA (log1p),
TEST_f_f (log1p, 0, 0),
TEST_f_f (log1p, minus_zero, minus_zero),
TEST_f_f (log1p, -0.25L, -0.287682072451780927439219005993827432L),
TEST_f_f (log1p, -0.875, -2.07944154167983592825169636437452970L),
- END_DATA (log1p)
};
static void
static const struct test_f_f_data log2_test_data[] =
{
- START_DATA (log2),
TEST_f_f (log2, 0, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log2, minus_zero, minus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (log2, 16.0, 4),
TEST_f_f (log2, 256.0, 8),
TEST_f_f (log2, 0.75L, -.415037499278843818546261056052183492L),
- END_DATA (log2)
};
static void
static const struct test_f_f_data logb_test_data[] =
{
- START_DATA (logb),
TEST_f_f (logb, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (logb, minus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (logb, 0x1p-16400L, -16400, NO_INEXACT_EXCEPTION),
TEST_f_f (logb, 0x.00000000001p-16382L, -16426, NO_INEXACT_EXCEPTION),
#endif
- END_DATA (logb)
};
static void
static const struct test_f_f_data logb_downward_test_data[] =
{
- START_DATA (logb_downward),
/* IEEE 754-2008 says (section 5.3.3) that "logB(1) is +0.". Libm
should not return -0 from logb in any rounding mode. PowerPC32 has
failed with this test for power4 logb (and logbl on all PowerPC
/* BZ #887 */
TEST_f_f (logb, 1.000e+0, plus_zero, NO_INEXACT_EXCEPTION),
- END_DATA (logb_downward)
};
static void
static const struct test_f_l_data lround_test_data[] =
{
- START_DATA (lround),
/* TODO: missing +/-Inf as well as qNaN tests. */
TEST_f_l (lround, 0, 0),
TEST_f_l (lround, minus_zero, 0),
TEST_f_l (lround, 0x1.fffffep+23, 16777215),
TEST_f_l (lround, -0x1.fffffep+23, -16777215),
#endif
- END_DATA (lround)
};
static void
static const struct test_f_L_data llround_test_data[] =
{
- START_DATA (llround),
/* TODO: missing +/-Inf as well as qNaN tests. */
TEST_f_L (llround, 0, 0),
TEST_f_L (llround, minus_zero, 0),
TEST_f_L (llround, 9223372036854775807.0L, 9223372036854775807LL),
TEST_f_L (llround, -9223372036854775807.0L, -9223372036854775807LL),
#endif
- END_DATA (llround)
};
static void
static const struct test_fF_f1_data modf_test_data[] =
{
- START_DATA (modf),
TEST_fF_f1 (modf, plus_infty, 0, plus_infty, NO_INEXACT_EXCEPTION),
TEST_fF_f1 (modf, minus_infty, minus_zero, minus_infty, NO_INEXACT_EXCEPTION),
TEST_fF_f1 (modf, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
TEST_fF_f1 (modf, 20, 0, 20, NO_INEXACT_EXCEPTION),
TEST_fF_f1 (modf, 21, 0, 21, NO_INEXACT_EXCEPTION),
TEST_fF_f1 (modf, 89.5, 0.5, 89, NO_INEXACT_EXCEPTION),
- END_DATA (modf)
};
static void
static const struct test_f_f_data nearbyint_test_data[] =
{
- START_DATA (nearbyint),
-
TEST_f_f (nearbyint, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_f_f (nearbyint, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_f_f (nearbyint, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (nearbyint, -562949953421312.75, -562949953421313.0, NO_INEXACT_EXCEPTION),
TEST_f_f (nearbyint, -1125899906842624.75, -1125899906842625.0, NO_INEXACT_EXCEPTION),
#endif
-
- END_DATA (nearbyint)
};
static void
static const struct test_ff_f_data nextafter_test_data[] =
{
- START_DATA (nextafter),
-
TEST_ff_f (nextafter, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (nextafter, minus_zero, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (nextafter, 0, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
/* XXX We need the hexadecimal FP number representation here for further
tests. */
- END_DATA (nextafter)
};
static void
static const struct test_ff_f_data_nexttoward nexttoward_test_data[] =
{
- START_DATA (nexttoward),
TEST_ff_f (nexttoward, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (nexttoward, minus_zero, 0, 0, NO_INEXACT_EXCEPTION),
TEST_ff_f (nexttoward, 0, minus_zero, minus_zero, NO_INEXACT_EXCEPTION),
TEST_ff_f (nexttoward, -1.0, -0x0.ffffffffffffffffffffffffffff8p0L, -0x0.fffffffffffff8p0, NO_INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (nexttoward)
};
static void
static const struct test_ff_f_data pow_test_data[] =
{
- START_DATA (pow),
TEST_ff_f (pow, 0, 0, 1),
TEST_ff_f (pow, 0, minus_zero, 1),
TEST_ff_f (pow, minus_zero, 0, 1),
TEST_ff_f (pow, 1.01L, -min_subnorm_value, 1.0L),
TEST_ff_f (pow, 2.0L, -100000.0L, plus_zero, UNDERFLOW_EXCEPTION),
- END_DATA (pow)
};
static void
static const struct test_ff_f_data pow_tonearest_test_data[] =
{
- START_DATA (pow_tonearest),
TEST_ff_f (pow, 1.0625L, 1.125L, 1.070582293028761362162622578677070098674L),
TEST_ff_f (pow, 1.5L, 1.03125L, 1.519127098714743184071644334163037684948L),
- END_DATA (pow_tonearest)
};
static void
static const struct test_ff_f_data pow_towardzero_test_data[] =
{
- START_DATA (pow_towardzero),
TEST_ff_f (pow, 1.0625L, 1.125L, 1.070582293028761362162622578677070098674L),
TEST_ff_f (pow, 1.5L, 1.03125L, 1.519127098714743184071644334163037684948L),
- END_DATA (pow_towardzero)
};
static void
static const struct test_ff_f_data pow_downward_test_data[] =
{
- START_DATA (pow_downward),
TEST_ff_f (pow, 1.0625L, 1.125L, 1.070582293028761362162622578677070098674L),
TEST_ff_f (pow, 1.5L, 1.03125L, 1.519127098714743184071644334163037684948L),
- END_DATA (pow_downward)
};
static void
static const struct test_ff_f_data pow_upward_test_data[] =
{
- START_DATA (pow_upward),
TEST_ff_f (pow, 1.0625L, 1.125L, 1.070582293028761362162622578677070098674L),
TEST_ff_f (pow, 1.5L, 1.03125L, 1.519127098714743184071644334163037684948L),
- END_DATA (pow_upward)
};
static void
static const struct test_ff_f_data remainder_test_data[] =
{
- START_DATA (remainder),
TEST_ff_f (remainder, 1, 0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, 1, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, plus_infty, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, -1.625, -1.0, 0.375, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 5.0, 2.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 3.0, 2.0, -1.0, NO_INEXACT_EXCEPTION),
- END_DATA (remainder)
};
static void
static const struct test_ff_f_data remainder_tonearest_test_data[] =
{
- START_DATA (remainder_tonearest),
TEST_ff_f (remainder, 1, 0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, 1, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, plus_infty, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, -1.625, -1.0, 0.375, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 5.0, 2.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 3.0, 2.0, -1.0, NO_INEXACT_EXCEPTION),
- END_DATA (remainder_tonearest)
};
static void
static const struct test_ff_f_data remainder_towardzero_test_data[] =
{
- START_DATA (remainder_towardzero),
TEST_ff_f (remainder, 1, 0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, 1, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, plus_infty, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, -1.625, -1.0, 0.375, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 5.0, 2.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 3.0, 2.0, -1.0, NO_INEXACT_EXCEPTION),
- END_DATA (remainder_towardzero)
};
static void
static const struct test_ff_f_data remainder_downward_test_data[] =
{
- START_DATA (remainder_downward),
TEST_ff_f (remainder, 1, 0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, 1, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, plus_infty, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, -1.625, -1.0, 0.375, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 5.0, 2.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 3.0, 2.0, -1.0, NO_INEXACT_EXCEPTION),
- END_DATA (remainder_downward)
};
static void
static const struct test_ff_f_data remainder_upward_test_data[] =
{
- START_DATA (remainder_upward),
TEST_ff_f (remainder, 1, 0, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, 1, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, plus_infty, minus_zero, qnan_value, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION|ERRNO_EDOM),
TEST_ff_f (remainder, -1.625, -1.0, 0.375, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 5.0, 2.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_ff_f (remainder, 3.0, 2.0, -1.0, NO_INEXACT_EXCEPTION),
- END_DATA (remainder_upward)
};
static void
static const struct test_ffI_f1_data remquo_test_data[] =
{
- START_DATA (remquo),
TEST_ffI_f1 (remquo, 1, 0, qnan_value, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
TEST_ffI_f1 (remquo, 1, minus_zero, qnan_value, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
TEST_ffI_f1 (remquo, plus_infty, 1, qnan_value, IGNORE, NO_INEXACT_EXCEPTION|INVALID_EXCEPTION),
TEST_ffI_f1 (remquo, 5, 2, 1, 2, NO_INEXACT_EXCEPTION),
TEST_ffI_f1 (remquo, 3, 2, -1, 2, NO_INEXACT_EXCEPTION),
- END_DATA (remquo)
};
static void
static const struct test_f_f_data rint_test_data[] =
{
- START_DATA (rint),
/* TODO: missing qNaN tests. */
TEST_f_f (rint, 0.0, 0.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, 10141204801825835211973625643009.5L, 10141204801825835211973625643010.0L, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (rint)
};
static void
static const struct test_f_f_data rint_tonearest_test_data[] =
{
- START_DATA (rint_tonearest),
TEST_f_f (rint, 2.0, 2.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, 1.5, 2.0, INEXACT_EXCEPTION),
TEST_f_f (rint, 1.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (rint_tonearest)
};
static void
static const struct test_f_f_data rint_towardzero_test_data[] =
{
- START_DATA (rint_towardzero),
TEST_f_f (rint, 2.0, 2.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, 1.5, 1.0, INEXACT_EXCEPTION),
TEST_f_f (rint, 1.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (rint_towardzero)
};
static void
static const struct test_f_f_data rint_downward_test_data[] =
{
- START_DATA (rint_downward),
TEST_f_f (rint, 2.0, 2.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, 1.5, 1.0, INEXACT_EXCEPTION),
TEST_f_f (rint, 1.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740994.0L, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (rint_downward)
};
static void
static const struct test_f_f_data rint_upward_test_data[] =
{
- START_DATA (rint_upward),
TEST_f_f (rint, 2.0, 2.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, 1.5, 2.0, INEXACT_EXCEPTION),
TEST_f_f (rint, 1.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_f_f (rint, -9007199254740993.5000000000001L, -9007199254740993.0L, INEXACT_EXCEPTION),
# endif
#endif
- END_DATA (rint_upward)
};
static void
static const struct test_f_f_data round_test_data[] =
{
- START_DATA (round),
/* TODO: missing +/-Inf as well as qNaN tests. */
TEST_f_f (round, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_f (round, 10141204801825835211973625643008.75L, 10141204801825835211973625643009.0L),
TEST_f_f (round, 10141204801825835211973625643009.5L, 10141204801825835211973625643010.0L),
#endif
- END_DATA (round)
};
static void
static const struct test_ff_f_data scalb_test_data[] =
{
- START_DATA (scalb),
TEST_ff_f (scalb, 2.0, 0.5, qnan_value, INVALID_EXCEPTION),
TEST_ff_f (scalb, 3.0, -2.5, qnan_value, INVALID_EXCEPTION),
TEST_ff_f (scalb, 0.8L, 4, 12.8L),
TEST_ff_f (scalb, -0.854375L, 5, -27.34L),
- END_DATA (scalb)
};
static void
static const struct test_fi_f_data scalbn_test_data[] =
{
- START_DATA (scalbn),
TEST_fi_f (scalbn, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_fi_f (scalbn, minus_zero, 0, minus_zero, NO_INEXACT_EXCEPTION),
TEST_fi_f (scalbn, min_value, INT_MIN, plus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
TEST_fi_f (scalbn, min_value / 4, INT_MAX, plus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION),
TEST_fi_f (scalbn, min_value / 4, INT_MIN, plus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
- END_DATA (scalbn)
};
static void
static const struct test_fl_f_data scalbln_test_data[] =
{
- START_DATA (scalbln),
TEST_fl_f (scalbln, 0, 0, 0, NO_INEXACT_EXCEPTION),
TEST_fl_f (scalbln, minus_zero, 0, minus_zero, NO_INEXACT_EXCEPTION),
TEST_fl_f (scalbln, min_value / 4, 0x88000000L, plus_infty, INEXACT_EXCEPTION|OVERFLOW_EXCEPTION),
TEST_fl_f (scalbln, min_value / 4, -0x88000000L, plus_zero, INEXACT_EXCEPTION|UNDERFLOW_EXCEPTION),
#endif
- END_DATA (scalbln)
};
static void
static const struct test_f_i_data signbit_test_data[] =
{
- START_DATA (signbit),
/* TODO: missing qNaN tests. */
TEST_f_b (signbit, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_b (signbit, minus_zero, 1, NO_INEXACT_EXCEPTION),
TEST_f_b (signbit, -1, 1, NO_INEXACT_EXCEPTION),
/* signbit (x) == 0 for x >= 0. */
TEST_f_b (signbit, 1, 0, NO_INEXACT_EXCEPTION),
- END_DATA (signbit)
};
static void
static const struct test_f_f_data sin_test_data[] =
{
- START_DATA (sin),
TEST_f_f (sin, 0, 0),
TEST_f_f (sin, minus_zero, minus_zero),
TEST_f_f (sin, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (sin, 0x1.fffffep+127, -5.21876523333658540551505357019806722935726e-01L),
TEST_f_f (sin, 0x1p+50, 4.96396515208940840876821859865411368093356e-01L),
TEST_f_f (sin, 0x1p+28, -9.86198211836975655703110310527108292055548e-01L),
- END_DATA (sin)
};
static void
static const struct test_f_f_data sin_tonearest_test_data[] =
{
- START_DATA (sin_tonearest),
TEST_f_f (sin, 1, 0.8414709848078965066525023216302989996226L),
TEST_f_f (sin, 2, 0.9092974268256816953960198659117448427023L),
TEST_f_f (sin, 3, 0.1411200080598672221007448028081102798469L),
TEST_f_f (sin, 8, 0.9893582466233817778081235982452886721164L),
TEST_f_f (sin, 9, 0.4121184852417565697562725663524351793439L),
TEST_f_f (sin, 10, -0.5440211108893698134047476618513772816836L),
- END_DATA (sin_tonearest)
};
static void
static const struct test_f_f_data sin_towardzero_test_data[] =
{
- START_DATA (sin_towardzero),
TEST_f_f (sin, 1, 0.8414709848078965066525023216302989996226L),
TEST_f_f (sin, 2, 0.9092974268256816953960198659117448427023L),
TEST_f_f (sin, 3, 0.1411200080598672221007448028081102798469L),
TEST_f_f (sin, 8, 0.9893582466233817778081235982452886721164L),
TEST_f_f (sin, 9, 0.4121184852417565697562725663524351793439L),
TEST_f_f (sin, 10, -0.5440211108893698134047476618513772816836L),
- END_DATA (sin_towardzero)
};
static void
static const struct test_f_f_data sin_downward_test_data[] =
{
- START_DATA (sin_downward),
TEST_f_f (sin, 1, 0.8414709848078965066525023216302989996226L),
TEST_f_f (sin, 2, 0.9092974268256816953960198659117448427023L),
TEST_f_f (sin, 3, 0.1411200080598672221007448028081102798469L),
TEST_f_f (sin, 8, 0.9893582466233817778081235982452886721164L),
TEST_f_f (sin, 9, 0.4121184852417565697562725663524351793439L),
TEST_f_f (sin, 10, -0.5440211108893698134047476618513772816836L),
- END_DATA (sin_downward)
};
static void
static const struct test_f_f_data sin_upward_test_data[] =
{
- START_DATA (sin_upward),
TEST_f_f (sin, 1, 0.8414709848078965066525023216302989996226L),
TEST_f_f (sin, 2, 0.9092974268256816953960198659117448427023L),
TEST_f_f (sin, 3, 0.1411200080598672221007448028081102798469L),
TEST_f_f (sin, 8, 0.9893582466233817778081235982452886721164L),
TEST_f_f (sin, 9, 0.4121184852417565697562725663524351793439L),
TEST_f_f (sin, 10, -0.5440211108893698134047476618513772816836L),
- END_DATA (sin_upward)
};
static void
static const struct test_fFF_11_data sincos_test_data[] =
{
- START_DATA (sincos),
TEST_fFF_11 (sincos, 0, 0, 1),
TEST_fFF_11 (sincos, minus_zero, minus_zero, 1),
TEST_fFF_11 (sincos, 0x1.fffffep+127, -5.21876523333658540551505357019806722935726e-01L, 8.53021039830304158051791467692161107353094e-01L),
TEST_fFF_11 (sincos, 0x1p+50, 4.96396515208940840876821859865411368093356e-01L, 8.68095904660550604334592502063501320395739e-01L),
TEST_fFF_11 (sincos, 0x1p+28, -9.86198211836975655703110310527108292055548e-01L, -1.65568979490578758865468278195361551113358e-01L),
- END_DATA (sincos)
};
static void
static const struct test_f_f_data sinh_test_data[] =
{
- START_DATA (sinh),
TEST_f_f (sinh, 0, 0),
TEST_f_f (sinh, minus_zero, minus_zero),
TEST_f_f (sinh, 0.75L, 0.822316731935829980703661634446913849L),
TEST_f_f (sinh, 0x8p-32L, 1.86264514923095703232705808926175479e-9L),
- END_DATA (sinh)
};
static void
static const struct test_f_f_data sinh_tonearest_test_data[] =
{
- START_DATA (sinh_tonearest),
TEST_f_f (sinh, 22, 1792456423.065795780701106568345764104225L),
TEST_f_f (sinh, 23, 4872401723.124451299966006944252978187305L),
TEST_f_f (sinh, 24, 13244561064.92173614705070540368454568168L),
- END_DATA (sinh_tonearest)
};
static void
static const struct test_f_f_data sinh_towardzero_test_data[] =
{
- START_DATA (sinh_towardzero),
TEST_f_f (sinh, 22, 1792456423.065795780701106568345764104225L),
TEST_f_f (sinh, 23, 4872401723.124451299966006944252978187305L),
TEST_f_f (sinh, 24, 13244561064.92173614705070540368454568168L),
- END_DATA (sinh_towardzero)
};
static void
static const struct test_f_f_data sinh_downward_test_data[] =
{
- START_DATA (sinh_downward),
TEST_f_f (sinh, 22, 1792456423.065795780701106568345764104225L),
TEST_f_f (sinh, 23, 4872401723.124451299966006944252978187305L),
TEST_f_f (sinh, 24, 13244561064.92173614705070540368454568168L),
- END_DATA (sinh_downward)
};
static void
static const struct test_f_f_data sinh_upward_test_data[] =
{
- START_DATA (sinh_upward),
TEST_f_f (sinh, 22, 1792456423.065795780701106568345764104225L),
TEST_f_f (sinh, 23, 4872401723.124451299966006944252978187305L),
TEST_f_f (sinh, 24, 13244561064.92173614705070540368454568168L),
- END_DATA (sinh_upward)
};
static void
static const struct test_f_f_data sqrt_test_data[] =
{
- START_DATA (sqrt),
TEST_f_f (sqrt, 0, 0, NO_INEXACT_EXCEPTION),
TEST_f_f (sqrt, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
TEST_f_f (sqrt, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (sqrt, 6642.25, 81.5, NO_INEXACT_EXCEPTION),
TEST_f_f (sqrt, 15190.5625L, 123.25L, NO_INEXACT_EXCEPTION),
TEST_f_f (sqrt, 0.75L, 0.866025403784438646763723170752936183L, INEXACT_EXCEPTION),
- END_DATA (sqrt)
};
static void
static const struct test_f_f_data tan_test_data[] =
{
- START_DATA (tan),
TEST_f_f (tan, 0, 0),
TEST_f_f (tan, minus_zero, minus_zero),
TEST_f_f (tan, plus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
TEST_f_f (tan, 0x1p16383L, 0.422722393732022337800504160054440141575L),
#endif
- END_DATA (tan)
};
static void
static const struct test_f_f_data tan_tonearest_test_data[] =
{
- START_DATA (tan_tonearest),
TEST_f_f (tan, 1, 1.5574077246549022305069748074583601730873L),
TEST_f_f (tan, 2, -2.1850398632615189916433061023136825434320L),
TEST_f_f (tan, 3, -0.1425465430742778052956354105339134932261L),
TEST_f_f (tan, 8, -6.7997114552203786999252627596086333648814L),
TEST_f_f (tan, 9, -0.4523156594418098405903708757987855343087L),
TEST_f_f (tan, 10, 0.6483608274590866712591249330098086768169L),
- END_DATA (tan_tonearest)
};
static void
static const struct test_f_f_data tan_towardzero_test_data[] =
{
- START_DATA (tan_towardzero),
TEST_f_f (tan, 1, 1.5574077246549022305069748074583601730873L),
TEST_f_f (tan, 2, -2.1850398632615189916433061023136825434320L),
TEST_f_f (tan, 3, -0.1425465430742778052956354105339134932261L),
TEST_f_f (tan, 8, -6.7997114552203786999252627596086333648814L),
TEST_f_f (tan, 9, -0.4523156594418098405903708757987855343087L),
TEST_f_f (tan, 10, 0.6483608274590866712591249330098086768169L),
- END_DATA (tan_towardzero)
};
static void
static const struct test_f_f_data tan_downward_test_data[] =
{
- START_DATA (tan_downward),
TEST_f_f (tan, 1, 1.5574077246549022305069748074583601730873L),
TEST_f_f (tan, 2, -2.1850398632615189916433061023136825434320L),
TEST_f_f (tan, 3, -0.1425465430742778052956354105339134932261L),
TEST_f_f (tan, 8, -6.7997114552203786999252627596086333648814L),
TEST_f_f (tan, 9, -0.4523156594418098405903708757987855343087L),
TEST_f_f (tan, 10, 0.6483608274590866712591249330098086768169L),
- END_DATA (tan_downward)
};
static void
static const struct test_f_f_data tan_upward_test_data[] =
{
- START_DATA (tan_upward),
TEST_f_f (tan, 1, 1.5574077246549022305069748074583601730873L),
TEST_f_f (tan, 2, -2.1850398632615189916433061023136825434320L),
TEST_f_f (tan, 3, -0.1425465430742778052956354105339134932261L),
TEST_f_f (tan, 8, -6.7997114552203786999252627596086333648814L),
TEST_f_f (tan, 9, -0.4523156594418098405903708757987855343087L),
TEST_f_f (tan, 10, 0.6483608274590866712591249330098086768169L),
- END_DATA (tan_upward)
};
static void
static const struct test_f_f_data tanh_test_data[] =
{
- START_DATA (tanh),
TEST_f_f (tanh, 0, 0),
TEST_f_f (tanh, minus_zero, minus_zero),
/* 2^-57 */
TEST_f_f (tanh, 0x1p-57L, 6.938893903907228377647697925567626953125e-18L),
- END_DATA (tanh)
};
static void
static const struct test_f_f_data tgamma_test_data[] =
{
- START_DATA (tgamma),
TEST_f_f (tgamma, plus_infty, plus_infty),
TEST_f_f (tgamma, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (tgamma, 0, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
TEST_f_f (tgamma, 0x6.db8c603359a971081bc4a2e9dfd4p+8L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
# endif
#endif
- END_DATA (tgamma)
};
static void
static const struct test_f_f_data trunc_test_data[] =
{
- START_DATA (trunc),
TEST_f_f (trunc, plus_infty, plus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (trunc, minus_infty, minus_infty, NO_INEXACT_EXCEPTION),
TEST_f_f (trunc, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
TEST_f_f (trunc, 10141204801825835211973625643008.75L, 10141204801825835211973625643008.0L),
TEST_f_f (trunc, 10141204801825835211973625643009.5L, 10141204801825835211973625643009.0L),
#endif
- END_DATA (trunc)
};
static void
static const struct test_f_f_data y0_test_data[] =
{
- START_DATA (y0),
/* y0 is the Bessel function of the second kind of order 0 */
TEST_f_f (y0, -1.0, minus_infty, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (y0, -max_value, minus_infty, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (y0, 0x1p-90L, -3.9788212322585974036636501709188067393195e+1L),
TEST_f_f (y0, 0x1p-100L, -4.420092432563900590456563035154802121284e+1L),
TEST_f_f (y0, 0x1p-110L, -4.861363632869203777249475899390797503250e+1L),
- END_DATA (y0)
};
static void
static const struct test_f_f_data y1_test_data[] =
{
- START_DATA (y1),
/* y1 is the Bessel function of the second kind of order 1 */
TEST_f_f (y1, -1.0, minus_infty, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (y1, -max_value, minus_infty, INVALID_EXCEPTION|ERRNO_EDOM),
TEST_f_f (y1, 0x1p-90L, -7.8809710601457349582707849528059121757126e+26L),
TEST_f_f (y1, 0x1p-100L, -8.0701143655892325972692837916732540679297e+29L),
TEST_f_f (y1, 0x1p-110L, -8.2637971103633741796037466026734121655600e+32L),
- END_DATA (y1)
};
static void
static const struct test_if_f_data yn_test_data[] =
{
- START_DATA (yn),
/* yn is the Bessel function of the second kind of order n */
/* yn (0, x) == y0 (x) */
TEST_if_f (yn, 0, -1.0, minus_infty, INVALID_EXCEPTION|ERRNO_EDOM),
/* Check whether yn returns correct value for LDBL_MIN, DBL_MIN,
and FLT_MIN. See Bug 14173. */
TEST_if_f (yn, 10, min_value, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
- END_DATA (yn)
};
static void
static const struct test_f_f_data significand_test_data[] =
{
- START_DATA (significand),
/* significand returns the mantissa of the exponential representation. */
/* TODO: missing +/-Inf as well as qNaN tests. */
TEST_f_f (significand, 4.0, 1.0, NO_INEXACT_EXCEPTION),
TEST_f_f (significand, 6.0, 1.5, NO_INEXACT_EXCEPTION),
TEST_f_f (significand, 8.0, 1.0, NO_INEXACT_EXCEPTION),
- END_DATA (significand)
};
static void