diff options
| author | Joseph Myers <joseph@codesourcery.com> | 2013-12-05 13:54:50 +0000 |
|---|---|---|
| committer | Joseph Myers <joseph@codesourcery.com> | 2013-12-05 13:54:50 +0000 |
| commit | bbf37bdc12c0370a0ac2fa597cddd660bad6ec5e (patch) | |
| tree | dedd0ec1962d0cdbe638a5ae3fb556dfa97db3a8 /math/libm-test.inc | |
| parent | c6bb4f23b036ab3ae972583bf1186a6131ce4968 (diff) | |
| download | glibc-bbf37bdc12c0370a0ac2fa597cddd660bad6ec5e.tar.xz glibc-bbf37bdc12c0370a0ac2fa597cddd660bad6ec5e.zip | |
Move TEST_f_f tests for [l-y]* functions from libm-test.inc to auto-libm-test-in.
Diffstat (limited to 'math/libm-test.inc')
| -rw-r--r-- | math/libm-test.inc | 844 |
1 files changed, 35 insertions, 809 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc index a4b2d51ef9..1d12d9177c 100644 --- a/math/libm-test.inc +++ b/math/libm-test.inc @@ -267,12 +267,20 @@ struct ulp_data #define TEST_COND_before_rounding (!TININESS_AFTER_ROUNDING) #define TEST_COND_after_rounding TININESS_AFTER_ROUNDING +#ifdef __x86_64__ +# define TEST_COND_x86_64 1 +#else +# define TEST_COND_x86_64 0 +#endif + +#ifdef __i386__ +# define TEST_COND_x86 1 +#else +# define TEST_COND_x86 0 +#endif + /* Various constants (we must supply them precalculated for accuracy). */ #define M_PI_6l .52359877559829887307710723054658383L -#define M_E2l 7.389056098930650227230427460575008L -#define M_E3l 20.085536923187667740928529654581719L -#define M_2_SQRT_PIl 3.5449077018110320545963349666822903L /* 2 sqrt (M_PIl) */ -#define M_SQRT_PIl 1.7724538509055160272981674833411451L /* sqrt (M_PIl) */ #define M_LOG_SQRT_PIl 0.57236494292470008707171367567652933L /* log(sqrt(M_PIl)) */ #define M_LOG_2_SQRT_PIl 1.265512123484645396488945797134706L /* log(2*sqrt(M_PIl)) */ #define M_PI_34l 2.356194490192344928846982537459627163L /* 3*pi/4 */ @@ -280,7 +288,6 @@ struct ulp_data #define M_PI2_LOG10El 0.682188176920920673742891812715677885L #define M_PI4_LOG10El 0.341094088460460336871445906357838943L #define M_PI_LOG10El 1.364376353841841347485783625431355770L -#define M_1_DIV_El 0.367879441171442321595523770161460867L /* 1 div e */ #define ulps_file_name "ULPs" /* Name of the ULPs file. */ static FILE *ulps_file; /* File to document difference. */ @@ -10658,19 +10665,13 @@ static const struct test_f_f_data log_test_data[] = 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, 1, 0), - TEST_f_f (log, -1, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (log, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (log, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (log, plus_infty, plus_infty), TEST_f_f (log, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_f_f (log, M_El, 1), - TEST_f_f (log, M_1_DIV_El, -1), - TEST_f_f (log, 2, M_LN2l), - TEST_f_f (log, 10, M_LN10l), - TEST_f_f (log, 0.75L, -0.287682072451780927439219005993827432L), + AUTO_TESTS_f_f (log, tonearest), }; static void @@ -10687,8 +10688,6 @@ static const struct test_f_f_data log10_test_data[] = 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, 1, 0), - /* log10 (x) == qNaN plus invalid exception if x < 0. */ TEST_f_f (log10, -1, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (log10, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), @@ -10697,12 +10696,7 @@ static const struct test_f_f_data log10_test_data[] = TEST_f_f (log10, plus_infty, plus_infty), TEST_f_f (log10, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_f_f (log10, 0.1L, -1), - TEST_f_f (log10, 10.0, 1), - TEST_f_f (log10, 100.0, 2), - TEST_f_f (log10, 10000.0, 4), - TEST_f_f (log10, M_El, M_LOG10El), - TEST_f_f (log10, 0.75L, -0.124938736608299953132449886193870744L), + AUTO_TESTS_f_f (log10, tonearest), }; static void @@ -10716,9 +10710,6 @@ log10_test (void) static const struct test_f_f_data log1p_test_data[] = { - TEST_f_f (log1p, 0, 0), - TEST_f_f (log1p, minus_zero, minus_zero), - TEST_f_f (log1p, -1, minus_infty, DIVIDE_BY_ZERO_EXCEPTION), TEST_f_f (log1p, -2, qnan_value, INVALID_EXCEPTION), TEST_f_f (log1p, -max_value, qnan_value, INVALID_EXCEPTION), @@ -10727,10 +10718,7 @@ static const struct test_f_f_data log1p_test_data[] = TEST_f_f (log1p, plus_infty, plus_infty), TEST_f_f (log1p, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_f_f (log1p, M_El - 1.0, 1), - - TEST_f_f (log1p, -0.25L, -0.287682072451780927439219005993827432L), - TEST_f_f (log1p, -0.875, -2.07944154167983592825169636437452970L), + AUTO_TESTS_f_f (log1p, tonearest), }; static void @@ -10747,8 +10735,6 @@ static const struct test_f_f_data log2_test_data[] = 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, 1, 0), - TEST_f_f (log2, -1, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (log2, -max_value, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (log2, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), @@ -10756,11 +10742,7 @@ static const struct test_f_f_data log2_test_data[] = TEST_f_f (log2, plus_infty, plus_infty), TEST_f_f (log2, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_f_f (log2, M_El, M_LOG2El), - TEST_f_f (log2, 2.0, 1), - TEST_f_f (log2, 16.0, 4), - TEST_f_f (log2, 256.0, 8), - TEST_f_f (log2, 0.75L, -.415037499278843818546261056052183492L), + AUTO_TESTS_f_f (log2, tonearest), }; static void @@ -13027,53 +13009,11 @@ signbit_test (void) static const struct test_f_f_data sin_test_data[] = { - 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, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (sin, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - TEST_f_f (sin, M_PI_6l, 0.5), - TEST_f_f (sin, -M_PI_6l, -0.5), - TEST_f_f (sin, M_PI_2l, 1), - TEST_f_f (sin, -M_PI_2l, -1), - TEST_f_f (sin, 0.75L, 0.681638760023334166733241952779893935L), - - TEST_f_f (sin, 0x1p65, -0.047183876212354673805106149805700013943218L), - TEST_f_f (sin, -0x1p65, 0.047183876212354673805106149805700013943218L), - - TEST_f_f (sin, 0x1.7f4134p+103, -6.6703229329788657073304190650534846045235e-08L), - -#ifdef TEST_DOUBLE - TEST_f_f (sin, 0.80190127184058835, 0.71867942238767868), - TEST_f_f (sin, 2.522464e-1, 2.4957989804940911e-1), -#endif - -#ifndef TEST_FLOAT - TEST_f_f (sin, 1e22, -0.8522008497671888017727058937530293682618L), - TEST_f_f (sin, 0x1p1023, 0.5631277798508840134529434079444683477104L), -#endif - -#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 - TEST_f_f (sin, 0x1p16383L, 0.3893629985894208126948115852610595405563L), -#endif - - TEST_f_f (sin, 0x1p+120, 3.77820109360752022655548470056922991960587e-01L), - TEST_f_f (sin, 0x1p+127, 6.23385512955870240370428801097126489001833e-01L), - TEST_f_f (sin, 0x1.fffff8p+127, 4.85786063130487339701113680434728152037092e-02L), - 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), - -#ifdef TEST_DOUBLE - TEST_f_f (sin, 0.93340582292648832662962377071381, 0x1.9b78326675a75p-1); - TEST_f_f (sin, 2.3328432680770916363144351635128, 0x1.7264abddb4205p-1); - TEST_f_f (sin, 3.7439477503636453548097051680088, -0x1.2217622485d94p-1); - TEST_f_f (sin, 3.9225160069792437411706487182528, -0x1.686a3d55a1306p-1); - TEST_f_f (sin, 4.0711651639931289992091478779912, -0x1.9a4c6be7f5eadp-1); - TEST_f_f (sin, 4.7858438478542097982426639646292, -0x1.fe9e8d4105e51p-1); - TEST_f_f (sin, 5.9840767662578002727968851104379, -0x1.2dbd90aa4d692p-2); -#endif + AUTO_TESTS_f_f (sin, tonearest), }; static void @@ -13087,16 +13027,7 @@ sin_test (void) static const struct test_f_f_data sin_tonearest_test_data[] = { - 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, 4, -0.7568024953079282513726390945118290941359L), - TEST_f_f (sin, 5, -0.9589242746631384688931544061559939733525L), - TEST_f_f (sin, 6, -0.2794154981989258728115554466118947596280L), - TEST_f_f (sin, 7, 0.6569865987187890903969990915936351779369L), - TEST_f_f (sin, 8, 0.9893582466233817778081235982452886721164L), - TEST_f_f (sin, 9, 0.4121184852417565697562725663524351793439L), - TEST_f_f (sin, 10, -0.5440211108893698134047476618513772816836L), + AUTO_TESTS_f_f (sin, tonearest), }; static void @@ -13110,16 +13041,7 @@ sin_test_tonearest (void) static const struct test_f_f_data sin_towardzero_test_data[] = { - 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, 4, -0.7568024953079282513726390945118290941359L), - TEST_f_f (sin, 5, -0.9589242746631384688931544061559939733525L), - TEST_f_f (sin, 6, -0.2794154981989258728115554466118947596280L), - TEST_f_f (sin, 7, 0.6569865987187890903969990915936351779369L), - TEST_f_f (sin, 8, 0.9893582466233817778081235982452886721164L), - TEST_f_f (sin, 9, 0.4121184852417565697562725663524351793439L), - TEST_f_f (sin, 10, -0.5440211108893698134047476618513772816836L), + AUTO_TESTS_f_f (sin, towardzero), }; static void @@ -13133,16 +13055,7 @@ sin_test_towardzero (void) static const struct test_f_f_data sin_downward_test_data[] = { - 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, 4, -0.7568024953079282513726390945118290941359L), - TEST_f_f (sin, 5, -0.9589242746631384688931544061559939733525L), - TEST_f_f (sin, 6, -0.2794154981989258728115554466118947596280L), - TEST_f_f (sin, 7, 0.6569865987187890903969990915936351779369L), - TEST_f_f (sin, 8, 0.9893582466233817778081235982452886721164L), - TEST_f_f (sin, 9, 0.4121184852417565697562725663524351793439L), - TEST_f_f (sin, 10, -0.5440211108893698134047476618513772816836L), + AUTO_TESTS_f_f (sin, downward), }; static void @@ -13156,16 +13069,7 @@ sin_test_downward (void) static const struct test_f_f_data sin_upward_test_data[] = { - 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, 4, -0.7568024953079282513726390945118290941359L), - TEST_f_f (sin, 5, -0.9589242746631384688931544061559939733525L), - TEST_f_f (sin, 6, -0.2794154981989258728115554466118947596280L), - TEST_f_f (sin, 7, 0.6569865987187890903969990915936351779369L), - TEST_f_f (sin, 8, 0.9893582466233817778081235982452886721164L), - TEST_f_f (sin, 9, 0.4121184852417565697562725663524351793439L), - TEST_f_f (sin, 10, -0.5440211108893698134047476618513772816836L), + AUTO_TESTS_f_f (sin, upward), }; static void @@ -13251,15 +13155,11 @@ sincos_test (void) static const struct test_f_f_data sinh_test_data[] = { - TEST_f_f (sinh, 0, 0), - TEST_f_f (sinh, minus_zero, minus_zero), - TEST_f_f (sinh, plus_infty, plus_infty, NO_TEST_INLINE), TEST_f_f (sinh, minus_infty, minus_infty, NO_TEST_INLINE), TEST_f_f (sinh, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_f_f (sinh, 0.75L, 0.822316731935829980703661634446913849L), - TEST_f_f (sinh, 0x8p-32L, 1.86264514923095703232705808926175479e-9L), + AUTO_TESTS_f_f (sinh, tonearest), }; static void @@ -13273,9 +13173,7 @@ sinh_test (void) static const struct test_f_f_data sinh_tonearest_test_data[] = { - TEST_f_f (sinh, 22, 1792456423.065795780701106568345764104225L), - TEST_f_f (sinh, 23, 4872401723.124451299966006944252978187305L), - TEST_f_f (sinh, 24, 13244561064.92173614705070540368454568168L), + AUTO_TESTS_f_f (sinh, tonearest), }; static void @@ -13289,9 +13187,7 @@ sinh_test_tonearest (void) static const struct test_f_f_data sinh_towardzero_test_data[] = { - TEST_f_f (sinh, 22, 1792456423.065795780701106568345764104225L), - TEST_f_f (sinh, 23, 4872401723.124451299966006944252978187305L), - TEST_f_f (sinh, 24, 13244561064.92173614705070540368454568168L), + AUTO_TESTS_f_f (sinh, towardzero), }; static void @@ -13305,9 +13201,7 @@ sinh_test_towardzero (void) static const struct test_f_f_data sinh_downward_test_data[] = { - TEST_f_f (sinh, 22, 1792456423.065795780701106568345764104225L), - TEST_f_f (sinh, 23, 4872401723.124451299966006944252978187305L), - TEST_f_f (sinh, 24, 13244561064.92173614705070540368454568168L), + AUTO_TESTS_f_f (sinh, downward), }; static void @@ -13321,9 +13215,7 @@ sinh_test_downward (void) static const struct test_f_f_data sinh_upward_test_data[] = { - TEST_f_f (sinh, 22, 1792456423.065795780701106568345764104225L), - TEST_f_f (sinh, 23, 4872401723.124451299966006944252978187305L), - TEST_f_f (sinh, 24, 13244561064.92173614705070540368454568168L), + AUTO_TESTS_f_f (sinh, upward), }; static void @@ -13443,64 +13335,11 @@ sqrt_test_upward (void) static const struct test_f_f_data tan_test_data[] = { - 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), TEST_f_f (tan, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (tan, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED), - TEST_f_f (tan, M_PI_4l, 1), - TEST_f_f (tan, 0.75L, 0.931596459944072461165202756573936428L), - - TEST_f_f (tan, 0x1p65, -0.0472364872359047946798414219288370688827L), - TEST_f_f (tan, -0x1p65, 0.0472364872359047946798414219288370688827L), - - TEST_f_f (tan, 0xc.9p-4, 0.9995162902115457818029468900654150261381L), - TEST_f_f (tan, 0xc.908p-4, 0.9997603425502441410973077452249560802034L), - TEST_f_f (tan, 0xc.90cp-4, 0.9998823910588060302788513970802357770031L), - TEST_f_f (tan, 0xc.90ep-4, 0.9999434208994808753305784795924711152508L), - TEST_f_f (tan, 0xc.90fp-4, 0.9999739372166156702433266059635165160515L), - TEST_f_f (tan, 0xc.90f8p-4, 0.9999891957244072765118898375645469865764L), - TEST_f_f (tan, 0xc.90fcp-4, 0.9999968250656122402859679132395522927393L), - TEST_f_f (tan, 0xc.90fdp-4, 0.9999987324100083358016192309006353329444L), - TEST_f_f (tan, 0xc.90fd8p-4, 0.9999996860835706212861509874451585282616L), - TEST_f_f (tan, 0xc.90fdap-4, 0.9999999245021033010474530133665235922808L), - TEST_f_f (tan, 0xc.ap-4, 1.0073556597407272165371804539701396631519L), - TEST_f_f (tan, 0xc.98p-4, 1.0034282930863044654045449407466962736255L), - TEST_f_f (tan, 0xc.94p-4, 1.0014703786820082237342656561856877993328L), - TEST_f_f (tan, 0xc.92p-4, 1.0004928571392300571266638743539017593717L), - TEST_f_f (tan, 0xc.91p-4, 1.0000044544650244953647966900221905361131L), - TEST_f_f (tan, 0xc.90fep-4, 1.0000006397580424009014454926842136804016L), - TEST_f_f (tan, 0xc.90fdcp-4, 1.0000001629206928242190327320047489394217L), - TEST_f_f (tan, 0xc.90fdbp-4, 1.0000000437113909572052640953950483705005L), - - TEST_f_f (tan, -0xc.9p-4, -0.9995162902115457818029468900654150261381L), - TEST_f_f (tan, -0xc.908p-4, -0.9997603425502441410973077452249560802034L), - TEST_f_f (tan, -0xc.90cp-4, -0.9998823910588060302788513970802357770031L), - TEST_f_f (tan, -0xc.90ep-4, -0.9999434208994808753305784795924711152508L), - TEST_f_f (tan, -0xc.90fp-4, -0.9999739372166156702433266059635165160515L), - TEST_f_f (tan, -0xc.90f8p-4, -0.9999891957244072765118898375645469865764L), - TEST_f_f (tan, -0xc.90fcp-4, -0.9999968250656122402859679132395522927393L), - TEST_f_f (tan, -0xc.90fdp-4, -0.9999987324100083358016192309006353329444L), - TEST_f_f (tan, -0xc.90fd8p-4, -0.9999996860835706212861509874451585282616L), - TEST_f_f (tan, -0xc.90fdap-4, -0.9999999245021033010474530133665235922808L), - TEST_f_f (tan, -0xc.ap-4, -1.0073556597407272165371804539701396631519L), - TEST_f_f (tan, -0xc.98p-4, -1.0034282930863044654045449407466962736255L), - TEST_f_f (tan, -0xc.94p-4, -1.0014703786820082237342656561856877993328L), - TEST_f_f (tan, -0xc.92p-4, -1.0004928571392300571266638743539017593717L), - TEST_f_f (tan, -0xc.91p-4, -1.0000044544650244953647966900221905361131L), - TEST_f_f (tan, -0xc.90fep-4, -1.0000006397580424009014454926842136804016L), - TEST_f_f (tan, -0xc.90fdcp-4, -1.0000001629206928242190327320047489394217L), - TEST_f_f (tan, -0xc.90fdbp-4, -1.0000000437113909572052640953950483705005L), - -#ifndef TEST_FLOAT - TEST_f_f (tan, 1e22, -1.628778225606898878549375936939548513545L), - TEST_f_f (tan, 0x1p1023, -0.6814476476066215012854144040167365190368L), -#endif - -#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384 - TEST_f_f (tan, 0x1p16383L, 0.422722393732022337800504160054440141575L), -#endif + AUTO_TESTS_f_f (tan, tonearest), }; static void @@ -13514,16 +13353,7 @@ tan_test (void) static const struct test_f_f_data tan_tonearest_test_data[] = { - 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, 4, 1.1578212823495775831373424182673239231198L), - TEST_f_f (tan, 5, -3.3805150062465856369827058794473439087096L), - TEST_f_f (tan, 6, -0.2910061913847491570536995888681755428312L), - TEST_f_f (tan, 7, 0.8714479827243187364564508896003135663222L), - TEST_f_f (tan, 8, -6.7997114552203786999252627596086333648814L), - TEST_f_f (tan, 9, -0.4523156594418098405903708757987855343087L), - TEST_f_f (tan, 10, 0.6483608274590866712591249330098086768169L), + AUTO_TESTS_f_f (tan, tonearest), }; static void @@ -13537,16 +13367,7 @@ tan_test_tonearest (void) static const struct test_f_f_data tan_towardzero_test_data[] = { - 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, 4, 1.1578212823495775831373424182673239231198L), - TEST_f_f (tan, 5, -3.3805150062465856369827058794473439087096L), - TEST_f_f (tan, 6, -0.2910061913847491570536995888681755428312L), - TEST_f_f (tan, 7, 0.8714479827243187364564508896003135663222L), - TEST_f_f (tan, 8, -6.7997114552203786999252627596086333648814L), - TEST_f_f (tan, 9, -0.4523156594418098405903708757987855343087L), - TEST_f_f (tan, 10, 0.6483608274590866712591249330098086768169L), + AUTO_TESTS_f_f (tan, towardzero), }; static void @@ -13560,16 +13381,7 @@ tan_test_towardzero (void) static const struct test_f_f_data tan_downward_test_data[] = { - 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, 4, 1.1578212823495775831373424182673239231198L), - TEST_f_f (tan, 5, -3.3805150062465856369827058794473439087096L), - TEST_f_f (tan, 6, -0.2910061913847491570536995888681755428312L), - TEST_f_f (tan, 7, 0.8714479827243187364564508896003135663222L), - TEST_f_f (tan, 8, -6.7997114552203786999252627596086333648814L), - TEST_f_f (tan, 9, -0.4523156594418098405903708757987855343087L), - TEST_f_f (tan, 10, 0.6483608274590866712591249330098086768169L), + AUTO_TESTS_f_f (tan, downward), }; static void @@ -13583,16 +13395,7 @@ tan_test_downward (void) static const struct test_f_f_data tan_upward_test_data[] = { - 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, 4, 1.1578212823495775831373424182673239231198L), - TEST_f_f (tan, 5, -3.3805150062465856369827058794473439087096L), - TEST_f_f (tan, 6, -0.2910061913847491570536995888681755428312L), - TEST_f_f (tan, 7, 0.8714479827243187364564508896003135663222L), - TEST_f_f (tan, 8, -6.7997114552203786999252627596086333648814L), - TEST_f_f (tan, 9, -0.4523156594418098405903708757987855343087L), - TEST_f_f (tan, 10, 0.6483608274590866712591249330098086768169L), + AUTO_TESTS_f_f (tan, upward), }; static void @@ -13606,21 +13409,11 @@ tan_test_upward (void) static const struct test_f_f_data tanh_test_data[] = { - TEST_f_f (tanh, 0, 0), - TEST_f_f (tanh, minus_zero, minus_zero), - TEST_f_f (tanh, plus_infty, 1, NO_TEST_INLINE), TEST_f_f (tanh, minus_infty, -1, NO_TEST_INLINE), TEST_f_f (tanh, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_f_f (tanh, 0.75L, 0.635148952387287319214434357312496495L), - TEST_f_f (tanh, -0.75L, -0.635148952387287319214434357312496495L), - - TEST_f_f (tanh, 1.0L, 0.7615941559557648881194582826047935904L), - TEST_f_f (tanh, -1.0L, -0.7615941559557648881194582826047935904L), - - /* 2^-57 */ - TEST_f_f (tanh, 0x1p-57L, 6.938893903907228377647697925567626953125e-18L), + AUTO_TESTS_f_f (tanh, tonearest), }; static void @@ -13643,514 +13436,7 @@ static const struct test_f_f_data tgamma_test_data[] = TEST_f_f (tgamma, minus_infty, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM), TEST_f_f (tgamma, qnan_value, qnan_value, NO_INEXACT_EXCEPTION), - TEST_f_f (tgamma, 0.5, M_SQRT_PIl), - TEST_f_f (tgamma, -0.5, -M_2_SQRT_PIl), - - TEST_f_f (tgamma, 1, 1), - TEST_f_f (tgamma, 2, 1), - TEST_f_f (tgamma, 3, 2), - TEST_f_f (tgamma, 4, 6), - TEST_f_f (tgamma, 5, 24), - TEST_f_f (tgamma, 6, 120), - TEST_f_f (tgamma, 7, 720), - TEST_f_f (tgamma, 8, 5040), - TEST_f_f (tgamma, 9, 40320), - TEST_f_f (tgamma, 10, 362880), - - TEST_f_f (tgamma, 0.7L, 1.29805533264755778568117117915281162L), - TEST_f_f (tgamma, 1.2L, 0.918168742399760610640951655185830401L), - - TEST_f_f (tgamma, 1.5L, 8.8622692545275801364908374167057259139877e-01L), - TEST_f_f (tgamma, 2.5L, 1.3293403881791370204736256125058588870982e+00L), - TEST_f_f (tgamma, 3.5L, 3.3233509704478425511840640312646472177454e+00L), - TEST_f_f (tgamma, 4.5L, 1.1631728396567448929144224109426265262109e+01L), - TEST_f_f (tgamma, 5.5L, 5.2342777784553520181149008492418193679490e+01L), - TEST_f_f (tgamma, 6.5L, 2.8788527781504436099631954670830006523720e+02L), - TEST_f_f (tgamma, 7.5L, 1.8712543057977883464760770536039504240418e+03L), - TEST_f_f (tgamma, 8.5L, 1.4034407293483412598570577902029628180313e+04L), - TEST_f_f (tgamma, 9.5L, 1.1929246199460900708784991216725183953266e+05L), - TEST_f_f (tgamma, -1.5L, 2.3632718012073547030642233111215269103967e+00L), - TEST_f_f (tgamma, -2.5L, -9.4530872048294188122568932444861076415869e-01L), - TEST_f_f (tgamma, -3.5L, 2.7008820585226910892162552127103164690248e-01L), - TEST_f_f (tgamma, -4.5L, -6.0019601300504246427027893615784810422774e-02L), - TEST_f_f (tgamma, -5.5L, 1.0912654781909862986732344293779056440504e-02L), - TEST_f_f (tgamma, -6.5L, -1.6788699664476712287280529682737009908468e-03L), - TEST_f_f (tgamma, -7.5L, 2.2384932885968949716374039576982679877958e-04L), - TEST_f_f (tgamma, -8.5L, -2.6335215159963470254557693619979623385833e-05L), - TEST_f_f (tgamma, -9.5L, 2.7721279115751021320587045915768024616666e-06L), - TEST_f_f (tgamma, 0x1p-24L, 1.6777215422784394050795179874582764575261e+07L), - TEST_f_f (tgamma, -0x1p-24L, -1.6777216577215723853867349114260580375249e+07L), - TEST_f_f (tgamma, 0x1p-53L, 9.0071992547409914227843350984672492007618e+15L), - TEST_f_f (tgamma, -0x1p-53L, -9.0071992547409925772156649015329704137860e+15L), - TEST_f_f (tgamma, 0x1p-64L, 1.8446744073709551615422784335098467139447e+19L), - TEST_f_f (tgamma, -0x1p-64L, -1.8446744073709551616577215664901532860660e+19L), - TEST_f_f (tgamma, 0x1p-106L, 8.1129638414606681695789005144063422784335e+31L), - TEST_f_f (tgamma, -0x1p-106L, -8.1129638414606681695789005144064577215665e+31L), - TEST_f_f (tgamma, 0x1p-113L, 1.0384593717069655257060992658440191422784e+34L), - TEST_f_f (tgamma, -0x1p-113L, -1.0384593717069655257060992658440192577216e+34L), - TEST_f_f (tgamma, 0x1p-127L, 1.7014118346046923173168730371588410572742e+38L), - TEST_f_f (tgamma, -0x1p-127L, -1.7014118346046923173168730371588410572858e+38L), -#ifdef TEST_FLOAT - TEST_f_f (tgamma, 0x1p-128L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), - TEST_f_f (tgamma, -0x1p-128L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), - TEST_f_f (tgamma, 0x1p-149L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), - TEST_f_f (tgamma, -0x1p-149L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), -#else - TEST_f_f (tgamma, 0x1p-128L, 3.4028236692093846346337460743176821145542e+38L), - TEST_f_f (tgamma, -0x1p-128L, -3.4028236692093846346337460743176821145658e+38L), - TEST_f_f (tgamma, 0x1p-149L, 7.1362384635297994052914298472474756819137e+44L), - TEST_f_f (tgamma, -0x1p-149L, -7.1362384635297994052914298472474756819137e+44L), -#endif -#ifndef TEST_FLOAT - TEST_f_f (tgamma, 0x1p-1023L, 8.9884656743115795386465259539451236680899e+307L), - TEST_f_f (tgamma, -0x1p-1023L, -8.9884656743115795386465259539451236680899e+307L), -# if !defined TEST_LDOUBLE || LDBL_MAX_EXP <= 1024 - TEST_f_f (tgamma, 0x1p-1024L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), - TEST_f_f (tgamma, -0x1p-1024L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), - TEST_f_f (tgamma, 0x1p-1074L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), - TEST_f_f (tgamma, -0x1p-1074L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE), -# else - TEST_f_f (tgamma, 0x1p-1024L, 1.7976931348623159077293051907890247336180e+308L), - TEST_f_f (tgamma, -0x1p-1024L, -1.7976931348623159077293051907890247336180e+308L), - TEST_f_f (tgamma, 0x1p-1074L, 2.0240225330731061835249534671891730704956e+323L), - TEST_f_f (tgamma, -0x1p-1074L, -2.0240225330731061835249534671891730704956e+323L), -# endif -#endif -#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381 - TEST_f_f (tgamma, 0x1p-16383L, 5.9486574767861588254287966331400356538172e+4931L), - TEST_f_f ( |
