mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-22 10:50:07 +00:00
Move tests of atan2, hypot and pow from libm-test.inc to auto-libm-test-in.
This commit is contained in:
parent
d4950d651a
commit
ff362e5b93
23
ChangeLog
23
ChangeLog
@ -1,3 +1,26 @@
|
||||
2013-12-16 Joseph Myers <joseph@codesourcery.com>
|
||||
|
||||
* math/auto-libm-test-in: Add tests of atan2, hypot and pow.
|
||||
* math/auto-libm-test-out: Regenerated.
|
||||
* math/libm-test.inc (atan2_test_data): Use AUTO_TESTS_ff_f.
|
||||
(hypot_test_data): Likewise.
|
||||
(pow_test_data): Likewise.
|
||||
(pow_tonearest_test_data): Likewise.
|
||||
* math/gen-auto-libm-tests.c (func_calc_method): Add value
|
||||
mpfr_ff_f.
|
||||
(func_calc_desc): Add mpfr_ff_f union field.
|
||||
(FUNC_mpfr_ff_f): New macro.
|
||||
(test_functions): Add atan2, hypot and pow.
|
||||
(special_fill_min): New function.
|
||||
(special_fill_minus_min): Likewise.
|
||||
(special_fill_min_subnorm): Likewise.
|
||||
(special_fill_minus_min_subnorm): Likewise.
|
||||
(special_real_inputs): Add min, -min, min_subnorm and
|
||||
-min_subnorm.
|
||||
(calc_generic_results): Handle mpfr_ff_f.
|
||||
* sysdeps/i386/fpu/libm-test-ulps: Update.
|
||||
* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
|
||||
|
||||
2013-12-16 Will Newton <will.newton@linaro.org>
|
||||
|
||||
* manual/memory.texi (Malloc Examples): Mention aligned_alloc.
|
||||
|
@ -69,6 +69,38 @@ atan 0x1p-100 missing-underflow
|
||||
atan 0x1p-600 missing-underflow
|
||||
atan 0x1p-10000 missing-underflow
|
||||
|
||||
# atan2 (0,x) == 0 for x > 0.
|
||||
atan2 0 1
|
||||
# atan2 (-0,x) == -0 for x > 0.
|
||||
atan2 -0 1
|
||||
atan2 0 0
|
||||
atan2 -0 0
|
||||
# atan2 (+0,x) == +pi for x < 0.
|
||||
atan2 0 -1
|
||||
# atan2 (-0,x) == -pi for x < 0.
|
||||
atan2 -0 -1
|
||||
atan2 0 -0
|
||||
atan2 -0 -0
|
||||
# atan2 (y,+0) == pi/2 for y > 0.
|
||||
atan2 1 0
|
||||
# atan2 (y,-0) == pi/2 for y > 0.
|
||||
atan2 1 -0
|
||||
# atan2 (y,+0) == -pi/2 for y < 0.
|
||||
atan2 -1 0
|
||||
# atan2 (y,-0) == -pi/2 for y < 0.
|
||||
atan2 -1 -0
|
||||
atan2 max max
|
||||
atan2 max min
|
||||
atan2 -max -min
|
||||
atan2 0.75 1
|
||||
atan2 -0.75 1.0
|
||||
atan2 0.75 -1.0
|
||||
atan2 -0.75 -1.0
|
||||
atan2 0.390625 .00029
|
||||
atan2 1.390625 0.9296875
|
||||
atan2 -0.00756827042671106339 -.001792735857538728036
|
||||
atan2 0x1.00000000000001p0 0x1.00000000000001p0
|
||||
|
||||
atanh 0
|
||||
atanh -0
|
||||
atanh 0.75
|
||||
@ -250,6 +282,35 @@ expm1 100000.0
|
||||
expm1 max
|
||||
expm1 -max
|
||||
|
||||
# hypot (x,y) == hypot (+-x, +-y).
|
||||
hypot 0.7 12.4
|
||||
hypot -0.7 12.4
|
||||
hypot 0.7 -12.4
|
||||
hypot -0.7 -12.4
|
||||
hypot 12.4 0.7
|
||||
hypot -12.4 0.7
|
||||
hypot 12.4 -0.7
|
||||
hypot -12.4 -0.7
|
||||
# hypot (x,0) == fabs (x).
|
||||
hypot 0.75 0
|
||||
hypot -0.75 0
|
||||
hypot -5.7e7 0
|
||||
hypot 0.75 1.25
|
||||
hypot 1.0 0x1p-61
|
||||
hypot 0x1p+0 0x1.fp-129
|
||||
# Bug 16314: spurious underflow exception may occur.
|
||||
hypot 0x1.23456789abcdef0123456789ab8p-500 0x1.23456789abcdef0123456789ab8p-500 spurious-underflow:dbl-64
|
||||
hypot 0x3p125 0x4p125 no-test-inline:flt-32
|
||||
hypot 0x1.234566p-126 0x1.234566p-126 no-test-inline:flt-32
|
||||
hypot 0x3p1021 0x4p1021 no-test-inline:dbl-64
|
||||
hypot 0x1p+0 0x0.3ep-1022 no-test-inline:dbl-64
|
||||
hypot 0x3p16381 0x4p16381 no-test-inline
|
||||
hypot 0x1p-149 0x1p-149
|
||||
hypot 0x1p-1074 0x1p-1074
|
||||
# Bug 16316: hypot broken for some subnormal arguments.
|
||||
hypot 0x1p-16445 0x1p-16445 no-test-inline xfail:ldbl-96-intel xfail:ldbl-96-m68k
|
||||
hypot 0x1p-16494 0x1p-16494 no-test-inline xfail:ldbl-96-intel xfail:ldbl-96-m68k
|
||||
|
||||
j0 -1.0
|
||||
j0 0.0
|
||||
j0 0.125
|
||||
@ -366,6 +427,298 @@ log2 16.0
|
||||
log2 256.0
|
||||
log2 0.75
|
||||
|
||||
pow 0 0
|
||||
pow 0 -0
|
||||
pow -0 0
|
||||
pow -0 -0
|
||||
|
||||
pow 10 0
|
||||
pow 10 -0
|
||||
pow -10 0
|
||||
pow -10 -0
|
||||
|
||||
pow 1 1
|
||||
pow 1 -1
|
||||
pow 1 1.25
|
||||
pow 1 -1.25
|
||||
pow 1 0x1p62
|
||||
pow 1 0x1p63
|
||||
pow 1 0x1p64
|
||||
pow 1 0x1p72
|
||||
pow 1 min_subnorm
|
||||
pow 1 -min_subnorm
|
||||
|
||||
# pow (x, +-0) == 1.
|
||||
pow 32.75 0
|
||||
pow 32.75 -0
|
||||
pow -32.75 0
|
||||
pow -32.75 -0
|
||||
pow 0x1p72 0
|
||||
pow 0x1p72 -0
|
||||
pow 0x1p-72 0
|
||||
pow 0x1p-72 -0
|
||||
|
||||
pow 0x1p72 0x1p72
|
||||
pow 10 -0x1p72
|
||||
pow max max
|
||||
pow 10 -max
|
||||
|
||||
pow 0 1
|
||||
pow 0 11
|
||||
|
||||
pow -0 1
|
||||
pow -0 11
|
||||
|
||||
pow 0 2
|
||||
pow 0 11.1
|
||||
|
||||
pow -0 2
|
||||
pow -0 11.1
|
||||
|
||||
# pow (+0, y) == +0 for y an odd integer > 0.
|
||||
pow 0.0 27
|
||||
pow 0.0 0xffffff
|
||||
pow 0.0 0x1.fffffffffffffp+52
|
||||
pow 0.0 0x1.fffffffffffffffep+63
|
||||
pow 0.0 0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow 0.0 0x1.ffffffffffffffffffffffffffffp+112
|
||||
|
||||
# pow (-0, y) == -0 for y an odd integer > 0.
|
||||
pow -0 27
|
||||
pow -0 0xffffff
|
||||
pow -0 0x1fffffe
|
||||
pow -0 0x1.fffffffffffffp+52
|
||||
pow -0 0x1.fffffffffffffp+53
|
||||
pow -0 0x1.fffffffffffffffep+63
|
||||
pow -0 0x1.fffffffffffffffep+64
|
||||
pow -0 0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -0 0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -0 0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -0 0x1.ffffffffffffffffffffffffffffp+113
|
||||
|
||||
# pow (+0, y) == +0 for y > 0 and not an odd integer.
|
||||
pow 0.0 4
|
||||
pow 0.0 0x1p24
|
||||
pow 0.0 0x1p127
|
||||
pow 0.0 max
|
||||
pow 0.0 min_subnorm
|
||||
|
||||
# pow (-0, y) == +0 for y > 0 and not an odd integer.
|
||||
pow -0 4
|
||||
pow -0 0x1p24
|
||||
pow -0 0x1p127
|
||||
pow -0 max
|
||||
pow -0 min_subnorm
|
||||
|
||||
pow 16 0.25
|
||||
pow 0x1p64 0.125
|
||||
pow 2 4
|
||||
pow 256 8
|
||||
|
||||
pow 0.75 1.25
|
||||
|
||||
pow -7.49321e+133 -9.80818e+16
|
||||
|
||||
pow -1.0 -0xffffff
|
||||
pow -1.0 -0x1fffffe
|
||||
pow -1.0 -0x1.fffffffffffffp+52
|
||||
pow -1.0 -0x1.fffffffffffffp+53
|
||||
pow -1.0 -0x1.fffffffffffffffep+63
|
||||
pow -1.0 -0x1.fffffffffffffffep+64
|
||||
pow -1.0 -0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -1.0 -0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -1.0 -0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -1.0 -0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -1.0 -max
|
||||
|
||||
pow -1.0 0xffffff
|
||||
pow -1.0 0x1fffffe
|
||||
pow -1.0 0x1.fffffffffffffp+52
|
||||
pow -1.0 0x1.fffffffffffffp+53
|
||||
pow -1.0 0x1.fffffffffffffffep+63
|
||||
pow -1.0 0x1.fffffffffffffffep+64
|
||||
pow -1.0 0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -1.0 0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -1.0 0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -1.0 0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -1.0 max
|
||||
|
||||
pow -2.0 126
|
||||
pow -2.0 127
|
||||
pow -2.0 -126
|
||||
pow -2.0 -127
|
||||
|
||||
pow -2.0 -0xffffff
|
||||
pow -2.0 -0x1fffffe
|
||||
pow -2.0 -0x1.fffffffffffffp+52
|
||||
pow -2.0 -0x1.fffffffffffffp+53
|
||||
pow -2.0 -0x1.fffffffffffffffep+63
|
||||
pow -2.0 -0x1.fffffffffffffffep+64
|
||||
pow -2.0 -0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -2.0 -0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -2.0 -0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -2.0 -0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -2.0 -max
|
||||
|
||||
pow -2.0 0xffffff
|
||||
pow -2.0 0x1fffffe
|
||||
pow -2.0 0x1.fffffffffffffp+52
|
||||
pow -2.0 0x1.fffffffffffffp+53
|
||||
pow -2.0 0x1.fffffffffffffffep+63
|
||||
pow -2.0 0x1.fffffffffffffffep+64
|
||||
pow -2.0 0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -2.0 0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -2.0 0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -2.0 0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -2.0 max
|
||||
|
||||
pow -max -2
|
||||
pow -max -3
|
||||
pow -max 2
|
||||
pow -max 3
|
||||
|
||||
pow -max -0xffffff
|
||||
pow -max -0x1fffffe
|
||||
pow -max -0x1.fffffffffffffp+52
|
||||
pow -max -0x1.fffffffffffffp+53
|
||||
pow -max -0x1.fffffffffffffffep+63
|
||||
pow -max -0x1.fffffffffffffffep+64
|
||||
pow -max -0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -max -0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -max -0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -max -0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -max -max
|
||||
|
||||
pow -max 0xffffff
|
||||
pow -max 0x1fffffe
|
||||
pow -max 0x1.fffffffffffffp+52
|
||||
pow -max 0x1.fffffffffffffp+53
|
||||
pow -max 0x1.fffffffffffffffep+63
|
||||
pow -max 0x1.fffffffffffffffep+64
|
||||
pow -max 0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -max 0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -max 0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -max 0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -max max
|
||||
|
||||
pow -0.5 126
|
||||
pow -0.5 127
|
||||
pow -0.5 -126
|
||||
pow -0.5 -127
|
||||
|
||||
pow -0.5 -0xffffff
|
||||
pow -0.5 -0x1fffffe
|
||||
pow -0.5 -0x1.fffffffffffffp+52
|
||||
pow -0.5 -0x1.fffffffffffffp+53
|
||||
pow -0.5 -0x1.fffffffffffffffep+63
|
||||
pow -0.5 -0x1.fffffffffffffffep+64
|
||||
pow -0.5 -0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -0.5 -0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -0.5 -0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -0.5 -0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -0.5 -max
|
||||
|
||||
pow -0.5 0xffffff
|
||||
pow -0.5 0x1fffffe
|
||||
pow -0.5 0x1.fffffffffffffp+52
|
||||
pow -0.5 0x1.fffffffffffffp+53
|
||||
pow -0.5 0x1.fffffffffffffffep+63
|
||||
pow -0.5 0x1.fffffffffffffffep+64
|
||||
pow -0.5 0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -0.5 0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -0.5 0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -0.5 0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -0.5 max
|
||||
|
||||
pow -min -2
|
||||
pow -min -3
|
||||
pow -min 1
|
||||
pow -min 2
|
||||
pow -min 3
|
||||
|
||||
pow -min -0xffffff
|
||||
pow -min -0x1fffffe
|
||||
pow -min -0x1.fffffffffffffp+52
|
||||
pow -min -0x1.fffffffffffffp+53
|
||||
pow -min -0x1.fffffffffffffffep+63
|
||||
pow -min -0x1.fffffffffffffffep+64
|
||||
pow -min -0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -min -0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -min -0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -min -0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -min -max
|
||||
|
||||
pow -min 0xffffff
|
||||
pow -min 0x1fffffe
|
||||
pow -min 0x1.fffffffffffffp+52
|
||||
pow -min 0x1.fffffffffffffp+53
|
||||
pow -min 0x1.fffffffffffffffep+63
|
||||
pow -min 0x1.fffffffffffffffep+64
|
||||
pow -min 0x1.ffffffffffffffffffffffffff8p+105
|
||||
pow -min 0x1.ffffffffffffffffffffffffff8p+106
|
||||
pow -min 0x1.ffffffffffffffffffffffffffffp+112
|
||||
pow -min 0x1.ffffffffffffffffffffffffffffp+113
|
||||
pow -min max
|
||||
|
||||
pow 0x0.ffffffp0 10
|
||||
pow 0x0.ffffffp0 100
|
||||
pow 0x0.ffffffp0 1000
|
||||
pow 0x0.ffffffp0 0x1p24
|
||||
pow 0x0.ffffffp0 0x1p30
|
||||
pow 0x0.ffffffp0 0x1.234566p30
|
||||
pow 0x0.ffffffp0 -10
|
||||
pow 0x0.ffffffp0 -100
|
||||
pow 0x0.ffffffp0 -1000
|
||||
pow 0x0.ffffffp0 -0x1p24
|
||||
pow 0x0.ffffffp0 -0x1p30
|
||||
pow 0x0.ffffffp0 -0x1.234566p30
|
||||
pow 0x1.000002p0 0x1p24
|
||||
pow 0x1.000002p0 0x1.234566p29
|
||||
pow 0x1.000002p0 -0x1.234566p29
|
||||
|
||||
pow 0x0.fffffffffffff8p0 0x1.23456789abcdfp62
|
||||
pow 0x0.fffffffffffff8p0 -0x1.23456789abcdfp62
|
||||
pow 0x1.0000000000001p0 0x1.23456789abcdfp61
|
||||
pow 0x1.0000000000001p0 -0x1.23456789abcdfp61
|
||||
|
||||
pow 0x0.ffffffffffffffffp0 0x1.23456789abcdef0ep77
|
||||
pow 0x0.ffffffffffffffffp0 -0x1.23456789abcdef0ep77
|
||||
pow 0x1.0000000000000002p0 0x1.23456789abcdef0ep76
|
||||
pow 0x1.0000000000000002p0 -0x1.23456789abcdef0ep76
|
||||
|
||||
pow 0x0.ffffffffffffffffffffffffffff8p0 0x1.23456789abcdef0123456789abcdp126
|
||||
pow 0x0.ffffffffffffffffffffffffffff8p0 -0x1.23456789abcdef0123456789abcdp126
|
||||
pow 0x1.0000000000000000000000000001p0 0x1.23456789abcdef0123456789abcdp125
|
||||
pow 0x1.0000000000000000000000000001p0 -0x1.23456789abcdef0123456789abcdp125
|
||||
|
||||
pow 1e4932 0.75
|
||||
pow 1e4928 0.75
|
||||
pow 1e4924 0.75
|
||||
pow 1e4920 0.75
|
||||
pow 10.0 4932.0
|
||||
pow 10.0 4931.0
|
||||
pow 10.0 4930.0
|
||||
pow 10.0 4929.0
|
||||
pow 10.0 -4931.0
|
||||
pow 10.0 -4930.0
|
||||
pow 10.0 -4929.0
|
||||
pow 1e27 182.0
|
||||
pow 1e27 -182.0
|
||||
|
||||
pow min_subnorm min_subnorm
|
||||
pow min_subnorm -min_subnorm
|
||||
pow max min_subnorm
|
||||
pow max -min_subnorm
|
||||
pow 0.99 min_subnorm
|
||||
pow 0.99 -min_subnorm
|
||||
pow 1.01 min_subnorm
|
||||
pow 1.01 -min_subnorm
|
||||
|
||||
pow 2.0 -100000.0
|
||||
|
||||
pow 1.0625 1.125
|
||||
pow 1.5 1.03125
|
||||
|
||||
sin 0
|
||||
sin -0
|
||||
sin pi/6
|
||||
|
42584
math/auto-libm-test-out
42584
math/auto-libm-test-out
File diff suppressed because it is too large
Load Diff
@ -392,6 +392,8 @@ typedef enum
|
||||
{
|
||||
/* MPFR function with a single argument and result. */
|
||||
mpfr_f_f,
|
||||
/* MPFR function with two arguments and one result. */
|
||||
mpfr_ff_f,
|
||||
/* MPFR function with a single argument and floating-point and
|
||||
integer results. */
|
||||
mpfr_f_f1,
|
||||
@ -406,6 +408,7 @@ typedef struct
|
||||
union
|
||||
{
|
||||
int (*mpfr_f_f) (mpfr_t, const mpfr_t, mpfr_rnd_t);
|
||||
int (*mpfr_ff_f) (mpfr_t, const mpfr_t, const mpfr_t, mpfr_rnd_t);
|
||||
int (*mpfr_f_f1) (mpfr_t, int *, const mpfr_t, mpfr_rnd_t);
|
||||
} func;
|
||||
} func_calc_desc;
|
||||
@ -454,6 +457,9 @@ typedef struct
|
||||
#define FUNC_mpfr_f_f(NAME, MPFR_FUNC, EXACT) \
|
||||
FUNC (NAME, ARGS1 (type_fp), RET1 (type_fp), EXACT, false, \
|
||||
CALC (mpfr_f_f, MPFR_FUNC))
|
||||
#define FUNC_mpfr_ff_f(NAME, MPFR_FUNC, EXACT) \
|
||||
FUNC (NAME, ARGS2 (type_fp, type_fp), RET1 (type_fp), EXACT, false, \
|
||||
CALC (mpfr_ff_f, MPFR_FUNC))
|
||||
|
||||
/* List of functions handled by this program. */
|
||||
static test_function test_functions[] =
|
||||
@ -463,6 +469,7 @@ static test_function test_functions[] =
|
||||
FUNC_mpfr_f_f ("asin", mpfr_asin, false),
|
||||
FUNC_mpfr_f_f ("asinh", mpfr_asinh, false),
|
||||
FUNC_mpfr_f_f ("atan", mpfr_atan, false),
|
||||
FUNC_mpfr_ff_f ("atan2", mpfr_atan2, false),
|
||||
FUNC_mpfr_f_f ("atanh", mpfr_atanh, false),
|
||||
FUNC_mpfr_f_f ("cbrt", mpfr_cbrt, false),
|
||||
FUNC_mpfr_f_f ("cos", mpfr_cos, false),
|
||||
@ -473,6 +480,7 @@ static test_function test_functions[] =
|
||||
FUNC_mpfr_f_f ("exp10", mpfr_exp10, false),
|
||||
FUNC_mpfr_f_f ("exp2", mpfr_exp2, false),
|
||||
FUNC_mpfr_f_f ("expm1", mpfr_expm1, false),
|
||||
FUNC_mpfr_ff_f ("hypot", mpfr_hypot, false),
|
||||
FUNC_mpfr_f_f ("j0", mpfr_j0, false),
|
||||
FUNC_mpfr_f_f ("j1", mpfr_j1, false),
|
||||
FUNC ("lgamma", ARGS1 (type_fp), RET2 (type_fp, type_int), false, false,
|
||||
@ -481,6 +489,7 @@ static test_function test_functions[] =
|
||||
FUNC_mpfr_f_f ("log10", mpfr_log10, false),
|
||||
FUNC_mpfr_f_f ("log1p", mpfr_log1p, false),
|
||||
FUNC_mpfr_f_f ("log2", mpfr_log2, false),
|
||||
FUNC_mpfr_ff_f ("pow", mpfr_pow, false),
|
||||
FUNC_mpfr_f_f ("sin", mpfr_sin, false),
|
||||
FUNC_mpfr_f_f ("sinh", mpfr_sinh, false),
|
||||
FUNC_mpfr_f_f ("sqrt", mpfr_sqrt, true),
|
||||
@ -664,6 +673,43 @@ special_fill_minus_max (mpfr_t res0, mpfr_t res1 __attribute__ ((unused)),
|
||||
return 1;
|
||||
}
|
||||
|
||||
static size_t
|
||||
special_fill_min (mpfr_t res0, mpfr_t res1 __attribute__ ((unused)),
|
||||
fp_format format)
|
||||
{
|
||||
mpfr_init2 (res0, fp_formats[format].mant_dig);
|
||||
assert_exact (mpfr_set (res0, fp_formats[format].min, MPFR_RNDN));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static size_t
|
||||
special_fill_minus_min (mpfr_t res0, mpfr_t res1 __attribute__ ((unused)),
|
||||
fp_format format)
|
||||
{
|
||||
mpfr_init2 (res0, fp_formats[format].mant_dig);
|
||||
assert_exact (mpfr_neg (res0, fp_formats[format].min, MPFR_RNDN));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static size_t
|
||||
special_fill_min_subnorm (mpfr_t res0, mpfr_t res1 __attribute__ ((unused)),
|
||||
fp_format format)
|
||||
{
|
||||
mpfr_init2 (res0, fp_formats[format].mant_dig);
|
||||
assert_exact (mpfr_set (res0, fp_formats[format].subnorm_min, MPFR_RNDN));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static size_t
|
||||
special_fill_minus_min_subnorm (mpfr_t res0,
|
||||
mpfr_t res1 __attribute__ ((unused)),
|
||||
fp_format format)
|
||||
{
|
||||
mpfr_init2 (res0, fp_formats[format].mant_dig);
|
||||
assert_exact (mpfr_neg (res0, fp_formats[format].subnorm_min, MPFR_RNDN));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static size_t
|
||||
special_fill_pi (mpfr_t res0, mpfr_t res1, fp_format format)
|
||||
{
|
||||
@ -825,6 +871,10 @@ static const special_real_input special_real_inputs[] =
|
||||
{
|
||||
{ "max", special_fill_max },
|
||||
{ "-max", special_fill_minus_max },
|
||||
{ "min", special_fill_min },
|
||||
{ "-min", special_fill_minus_min },
|
||||
{ "min_subnorm", special_fill_min_subnorm },
|
||||
{ "-min_subnorm", special_fill_minus_min_subnorm },
|
||||
{ "pi", special_fill_pi },
|
||||
{ "-pi", special_fill_minus_pi },
|
||||
{ "pi/2", special_fill_pi_2 },
|
||||
@ -1266,6 +1316,15 @@ calc_generic_results (generic_value *outputs, generic_value *inputs,
|
||||
adjust_real (outputs[0].value.f, inexact);
|
||||
break;
|
||||
|
||||
case mpfr_ff_f:
|
||||
assert (inputs[0].type == gtype_fp);
|
||||
outputs[0].type = gtype_fp;
|
||||
mpfr_init (outputs[0].value.f);
|
||||
inexact = calc->func.mpfr_ff_f (outputs[0].value.f, inputs[0].value.f,
|
||||
inputs[1].value.f, MPFR_RNDZ);
|
||||
adjust_real (outputs[0].value.f, inexact);
|
||||
break;
|
||||
|
||||
case mpfr_f_f1:
|
||||
assert (inputs[0].type == gtype_fp);
|
||||
outputs[0].type = gtype_fp;
|
||||
|
@ -1880,36 +1880,6 @@ atanh_test (void)
|
||||
|
||||
static const struct test_ff_f_data atan2_test_data[] =
|
||||
{
|
||||
/* atan2 (0,x) == 0 for x > 0. */
|
||||
TEST_ff_f (atan2, 0, 1, 0),
|
||||
|
||||
/* atan2 (-0,x) == -0 for x > 0. */
|
||||
TEST_ff_f (atan2, minus_zero, 1, minus_zero),
|
||||
|
||||
TEST_ff_f (atan2, 0, 0, 0),
|
||||
TEST_ff_f (atan2, minus_zero, 0, minus_zero),
|
||||
|
||||
/* atan2 (+0,x) == +pi for x < 0. */
|
||||
TEST_ff_f (atan2, 0, -1, M_PIl),
|
||||
|
||||
/* atan2 (-0,x) == -pi for x < 0. */
|
||||
TEST_ff_f (atan2, minus_zero, -1, -M_PIl),
|
||||
|
||||
TEST_ff_f (atan2, 0, minus_zero, M_PIl),
|
||||
TEST_ff_f (atan2, minus_zero, minus_zero, -M_PIl),
|
||||
|
||||
/* atan2 (y,+0) == pi/2 for y > 0. */
|
||||
TEST_ff_f (atan2, 1, 0, M_PI_2l),
|
||||
|
||||
/* atan2 (y,-0) == pi/2 for y > 0. */
|
||||
TEST_ff_f (atan2, 1, minus_zero, M_PI_2l),
|
||||
|
||||
/* atan2 (y,+0) == -pi/2 for y < 0. */
|
||||
TEST_ff_f (atan2, -1, 0, -M_PI_2l),
|
||||
|
||||
/* atan2 (y,-0) == -pi/2 for y < 0. */
|
||||
TEST_ff_f (atan2, -1, minus_zero, -M_PI_2l),
|
||||
|
||||
/* atan2 (y,inf) == +0 for finite y > 0. */
|
||||
TEST_ff_f (atan2, 1, plus_infty, 0),
|
||||
|
||||
@ -1934,22 +1904,7 @@ static const struct test_ff_f_data atan2_test_data[] =
|
||||
TEST_ff_f (atan2, minus_infty, minus_infty, -M_PI_34l),
|
||||
TEST_ff_f (atan2, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
|
||||
|
||||
TEST_ff_f (atan2, max_value, max_value, M_PI_4l),
|
||||
|
||||
TEST_ff_f (atan2, max_value, min_value, M_PI_2l),
|
||||
TEST_ff_f (atan2, -max_value, -min_value, -M_PI_2l),
|
||||
|
||||
TEST_ff_f (atan2, 0.75L, 1, 0.643501108793284386802809228717322638L),
|
||||
TEST_ff_f (atan2, -0.75L, 1.0L, -0.643501108793284386802809228717322638L),
|
||||
TEST_ff_f (atan2, 0.75L, -1.0L, 2.49809154479650885165983415456218025L),
|
||||
TEST_ff_f (atan2, -0.75L, -1.0L, -2.49809154479650885165983415456218025L),
|
||||
TEST_ff_f (atan2, 0.390625L, .00029L, 1.57005392693128974780151246612928941L),
|
||||
TEST_ff_f (atan2, 1.390625L, 0.9296875L, 0.981498387184244311516296577615519772L),
|
||||
|
||||
TEST_ff_f (atan2, -0.00756827042671106339L, -.001792735857538728036L, -1.80338464113663849327153994379639112L),
|
||||
#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (atan2, 0x1.00000000000001p0L, 0x1.00000000000001p0L, M_PI_4l),
|
||||
#endif
|
||||
AUTO_TESTS_ff_f (atan2, tonearest),
|
||||
};
|
||||
|
||||
static void
|
||||
@ -9190,53 +9145,7 @@ static const struct test_ff_f_data hypot_test_data[] =
|
||||
|
||||
TEST_ff_f (hypot, qnan_value, qnan_value, qnan_value, NO_INEXACT_EXCEPTION),
|
||||
|
||||
/* hypot (x,y) == hypot (+-x, +-y) */
|
||||
TEST_ff_f (hypot, 0.7L, 12.4L, 12.419742348374220601176836866763271L),
|
||||
TEST_ff_f (hypot, -0.7L, 12.4L, 12.419742348374220601176836866763271L),
|
||||
TEST_ff_f (hypot, 0.7L, -12.4L, 12.419742348374220601176836866763271L),
|
||||
TEST_ff_f (hypot, -0.7L, -12.4L, 12.419742348374220601176836866763271L),
|
||||
TEST_ff_f (hypot, 12.4L, 0.7L, 12.419742348374220601176836866763271L),
|
||||
TEST_ff_f (hypot, -12.4L, 0.7L, 12.419742348374220601176836866763271L),
|
||||
TEST_ff_f (hypot, 12.4L, -0.7L, 12.419742348374220601176836866763271L),
|
||||
TEST_ff_f (hypot, -12.4L, -0.7L, 12.419742348374220601176836866763271L),
|
||||
|
||||
/* hypot (x,0) == fabs (x) */
|
||||
TEST_ff_f (hypot, 0.75L, 0, 0.75L),
|
||||
TEST_ff_f (hypot, -0.75L, 0, 0.75L),
|
||||
TEST_ff_f (hypot, -5.7e7, 0, 5.7e7L),
|
||||
|
||||
TEST_ff_f (hypot, 0.75L, 1.25L, 1.45773797371132511771853821938639577L),
|
||||
|
||||
TEST_ff_f (hypot, 1.0L, 0x1p-61L, 1.0L),
|
||||
TEST_ff_f (hypot, 0x1p+0L, 0x1.fp-129L, 0x1p+0L),
|
||||
#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (hypot, 0x1.23456789abcdef0123456789ab8p-500L, 0x1.23456789abcdef0123456789ab8p-500L, 4.9155782399407039128612180934736799735113e-151L),
|
||||
#endif
|
||||
|
||||
TEST_ff_f (hypot, 0x3p125L, 0x4p125L, 0x5p125L, NO_TEST_INLINE_FLOAT),
|
||||
TEST_ff_f (hypot, 0x1.234566p-126L, 0x1.234566p-126L, 1.891441686191081936598531534017449451173e-38L, NO_TEST_INLINE_FLOAT),
|
||||
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (hypot, 0x3p1021L, 0x4p1021L, 0x5p1021L, NO_TEST_INLINE_DOUBLE),
|
||||
TEST_ff_f (hypot, 0x1p+0L, 0x0.3ep-1022L, 0x1p+0L, NO_TEST_INLINE_DOUBLE),
|
||||
#endif
|
||||
|
||||
#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
|
||||
TEST_ff_f (hypot, 0x3p16381L, 0x4p16381L, 0x5p16381L, NO_TEST_INLINE),
|
||||
#endif
|
||||
|
||||
TEST_ff_f (hypot, 0x1p-149L, 0x1p-149L, 1.9817352931807469938024533350782879785095e-45L, UNDERFLOW_EXCEPTION_FLOAT),
|
||||
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (hypot, 0x1p-1074L, 0x1p-1074L, 6.9871433705131320800651344656990806305791e-324L, UNDERFLOW_EXCEPTION_DOUBLE),
|
||||
#endif
|
||||
|
||||
#if defined TEST_LDOUBLE && LDBL_MIN_EXP <= -16381
|
||||
TEST_ff_f (hypot, 0x1p-16445L, 0x1p-16445L, 5.1550906155442528702558159159596215039925e-4951L, UNDERFLOW_EXCEPTION|NO_TEST_INLINE),
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (hypot, 0x1p-16494L, 0x1p-16494L, 9.1572804726500807075521065242888978445857e-4966L, UNDERFLOW_EXCEPTION|NO_TEST_INLINE),
|
||||
# endif
|
||||
#endif
|
||||
AUTO_TESTS_ff_f (hypot, tonearest),
|
||||
};
|
||||
|
||||
static void
|
||||
@ -11190,16 +11099,6 @@ nexttoward_test (void)
|
||||
|
||||
static const struct test_ff_f_data pow_test_data[] =
|
||||
{
|
||||
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, minus_zero, minus_zero, 1),
|
||||
|
||||
TEST_ff_f (pow, 10, 0, 1),
|
||||
TEST_ff_f (pow, 10, minus_zero, 1),
|
||||
TEST_ff_f (pow, -10, 0, 1),
|
||||
TEST_ff_f (pow, -10, minus_zero, 1),
|
||||
|
||||
TEST_ff_f (pow, qnan_value, 0, 1),
|
||||
TEST_ff_f (pow, qnan_value, minus_zero, 1),
|
||||
|
||||
@ -11286,30 +11185,12 @@ static const struct test_ff_f_data pow_test_data[] =
|
||||
TEST_ff_f (pow, -1, plus_infty, 1),
|
||||
TEST_ff_f (pow, 1, minus_infty, 1),
|
||||
TEST_ff_f (pow, -1, minus_infty, 1),
|
||||
TEST_ff_f (pow, 1, 1, 1),
|
||||
TEST_ff_f (pow, 1, -1, 1),
|
||||
TEST_ff_f (pow, 1, 1.25, 1),
|
||||
TEST_ff_f (pow, 1, -1.25, 1),
|
||||
TEST_ff_f (pow, 1, 0x1p62L, 1),
|
||||
TEST_ff_f (pow, 1, 0x1p63L, 1),
|
||||
TEST_ff_f (pow, 1, 0x1p64L, 1),
|
||||
TEST_ff_f (pow, 1, 0x1p72L, 1),
|
||||
TEST_ff_f (pow, 1, min_subnorm_value, 1),
|
||||
TEST_ff_f (pow, 1, -min_subnorm_value, 1),
|
||||
|
||||
/* pow (x, +-0) == 1. */
|
||||
TEST_ff_f (pow, plus_infty, 0, 1),
|
||||
TEST_ff_f (pow, plus_infty, minus_zero, 1),
|
||||
TEST_ff_f (pow, minus_infty, 0, 1),
|
||||
TEST_ff_f (pow, minus_infty, minus_zero, 1),
|
||||
TEST_ff_f (pow, 32.75L, 0, 1),
|
||||
TEST_ff_f (pow, 32.75L, minus_zero, 1),
|
||||
TEST_ff_f (pow, -32.75L, 0, 1),
|
||||
TEST_ff_f (pow, -32.75L, minus_zero, 1),
|
||||
TEST_ff_f (pow, 0x1p72L, 0, 1),
|
||||
TEST_ff_f (pow, 0x1p72L, minus_zero, 1),
|
||||
TEST_ff_f (pow, 0x1p-72L, 0, 1),
|
||||
TEST_ff_f (pow, 0x1p-72L, minus_zero, 1),
|
||||
|
||||
TEST_ff_f (pow, -0.1L, 1.1L, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
TEST_ff_f (pow, -0.1L, -1.1L, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
@ -11373,22 +11254,6 @@ static const struct test_ff_f_data pow_test_data[] =
|
||||
TEST_ff_f (pow, minus_zero, -0x1p127, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, minus_zero, -max_value, plus_infty, DIVIDE_BY_ZERO_EXCEPTION|ERRNO_ERANGE),
|
||||
|
||||
TEST_ff_f (pow, 0x1p72L, 0x1p72L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, 10, -0x1p72L, 0, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, max_value, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, 10, -max_value, 0, UNDERFLOW_EXCEPTION),
|
||||
|
||||
TEST_ff_f (pow, 0, 1, 0),
|
||||
TEST_ff_f (pow, 0, 11, 0),
|
||||
|
||||
TEST_ff_f (pow, minus_zero, 1, minus_zero),
|
||||
TEST_ff_f (pow, minus_zero, 11, minus_zero),
|
||||
|
||||
TEST_ff_f (pow, 0, 2, 0),
|
||||
TEST_ff_f (pow, 0, 11.1L, 0),
|
||||
|
||||
TEST_ff_f (pow, minus_zero, 2, 0),
|
||||
TEST_ff_f (pow, minus_zero, 11.1L, 0),
|
||||
TEST_ff_f (pow, 0, plus_infty, 0),
|
||||
TEST_ff_f (pow, minus_zero, plus_infty, 0),
|
||||
TEST_ff_f (pow, 0, minus_infty, plus_infty, DIVIDE_BY_ZERO_EXCEPTION_OK),
|
||||
@ -11505,384 +11370,14 @@ static const struct test_ff_f_data pow_test_data[] =
|
||||
TEST_ff_f (pow, minus_infty, -0x1p127, 0.0),
|
||||
TEST_ff_f (pow, minus_infty, -max_value, 0.0),
|
||||
|
||||
/* pow (+0, y) == +0 for y an odd integer > 0. */
|
||||
TEST_ff_f (pow, 0.0, 27, 0.0),
|
||||
TEST_ff_f (pow, 0.0, 0xffffff, 0.0),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, 0.0, 0x1.fffffffffffffp+52L, 0.0),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, 0.0, 0x1.fffffffffffffffep+63L, 0.0),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, 0.0, 0x1.ffffffffffffffffffffffffff8p+105L, 0.0),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, 0.0, 0x1.ffffffffffffffffffffffffffffp+112L, 0.0),
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* pow (-0, y) == -0 for y an odd integer > 0. */
|
||||
TEST_ff_f (pow, minus_zero, 27, minus_zero),
|
||||
TEST_ff_f (pow, minus_zero, 0xffffff, minus_zero),
|
||||
TEST_ff_f (pow, minus_zero, 0x1fffffe, plus_zero),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffp+52L, minus_zero),
|
||||
TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffp+53L, plus_zero),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffffep+63L, minus_zero),
|
||||
TEST_ff_f (pow, minus_zero, 0x1.fffffffffffffffep+64L, plus_zero),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffff8p+105L, minus_zero),
|
||||
TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffff8p+106L, plus_zero),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffffffp+112L, minus_zero),
|
||||
TEST_ff_f (pow, minus_zero, 0x1.ffffffffffffffffffffffffffffp+113L, plus_zero),
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* pow (+0, y) == +0 for y > 0 and not an odd integer. */
|
||||
TEST_ff_f (pow, 0.0, 4, 0.0),
|
||||
TEST_ff_f (pow, 0.0, 0x1p24, 0.0),
|
||||
TEST_ff_f (pow, 0.0, 0x1p127, 0.0),
|
||||
TEST_ff_f (pow, 0.0, max_value, 0.0),
|
||||
TEST_ff_f (pow, 0.0, min_subnorm_value, 0.0),
|
||||
|
||||
/* pow (-0, y) == +0 for y > 0 and not an odd integer. */
|
||||
TEST_ff_f (pow, minus_zero, 4, 0.0),
|
||||
TEST_ff_f (pow, minus_zero, 0x1p24, 0.0),
|
||||
TEST_ff_f (pow, minus_zero, 0x1p127, 0.0),
|
||||
TEST_ff_f (pow, minus_zero, max_value, 0.0),
|
||||
TEST_ff_f (pow, minus_zero, min_subnorm_value, 0.0),
|
||||
|
||||
TEST_ff_f (pow, 16, 0.25L, 2),
|
||||
TEST_ff_f (pow, 0x1p64L, 0.125L, 256),
|
||||
TEST_ff_f (pow, 2, 4, 16),
|
||||
TEST_ff_f (pow, 256, 8, 0x1p64L),
|
||||
|
||||
TEST_ff_f (pow, 0.75L, 1.25L, 0.697953644326574699205914060237425566L),
|
||||
|
||||
#if defined TEST_DOUBLE || defined TEST_LDOUBLE
|
||||
TEST_ff_f (pow, -7.49321e+133, -9.80818e+16, 0, UNDERFLOW_EXCEPTION),
|
||||
#endif
|
||||
|
||||
TEST_ff_f (pow, -1.0, -0xffffff, -1.0),
|
||||
TEST_ff_f (pow, -1.0, -0x1fffffe, 1.0),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -1.0, -0x1.fffffffffffffp+52L, -1.0),
|
||||
TEST_ff_f (pow, -1.0, -0x1.fffffffffffffp+53L, 1.0),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -1.0, -0x1.fffffffffffffffep+63L, -1.0),
|
||||
TEST_ff_f (pow, -1.0, -0x1.fffffffffffffffep+64L, 1.0),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -1.0, -0x1.ffffffffffffffffffffffffff8p+105L, -1.0),
|
||||
TEST_ff_f (pow, -1.0, -0x1.ffffffffffffffffffffffffff8p+106L, 1.0),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -1.0, -0x1.ffffffffffffffffffffffffffffp+112L, -1.0),
|
||||
TEST_ff_f (pow, -1.0, -0x1.ffffffffffffffffffffffffffffp+113L, 1.0),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -1.0, -max_value, 1.0),
|
||||
|
||||
TEST_ff_f (pow, -1.0, 0xffffff, -1.0),
|
||||
TEST_ff_f (pow, -1.0, 0x1fffffe, 1.0),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -1.0, 0x1.fffffffffffffp+52L, -1.0),
|
||||
TEST_ff_f (pow, -1.0, 0x1.fffffffffffffp+53L, 1.0),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -1.0, 0x1.fffffffffffffffep+63L, -1.0),
|
||||
TEST_ff_f (pow, -1.0, 0x1.fffffffffffffffep+64L, 1.0),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -1.0, 0x1.ffffffffffffffffffffffffff8p+105L, -1.0),
|
||||
TEST_ff_f (pow, -1.0, 0x1.ffffffffffffffffffffffffff8p+106L, 1.0),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -1.0, 0x1.ffffffffffffffffffffffffffffp+112L, -1.0),
|
||||
TEST_ff_f (pow, -1.0, 0x1.ffffffffffffffffffffffffffffp+113L, 1.0),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -1.0, max_value, 1.0),
|
||||
|
||||
TEST_ff_f (pow, -2.0, 126, 0x1p126),
|
||||
TEST_ff_f (pow, -2.0, 127, -0x1p127),
|
||||
/* Allow inexact results for float to be considered to underflow. */
|
||||
TEST_ff_f (pow, -2.0, -126, 0x1p-126, UNDERFLOW_EXCEPTION_OK_FLOAT),
|
||||
TEST_ff_f (pow, -2.0, -127, -0x1p-127, UNDERFLOW_EXCEPTION_OK_FLOAT),
|
||||
|
||||
TEST_ff_f (pow, -2.0, -0xffffff, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -2.0, -0x1fffffe, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -2.0, -0x1.fffffffffffffp+52L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -2.0, -0x1.fffffffffffffp+53L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -2.0, -0x1.fffffffffffffffep+63L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -2.0, -0x1.fffffffffffffffep+64L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -2.0, -0x1.ffffffffffffffffffffffffff8p+105L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -2.0, -0x1.ffffffffffffffffffffffffff8p+106L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -2.0, -0x1.ffffffffffffffffffffffffffffp+112L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -2.0, -0x1.ffffffffffffffffffffffffffffp+113L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -2.0, -max_value, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
|
||||
TEST_ff_f (pow, -2.0, 0xffffff, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -2.0, 0x1fffffe, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -2.0, 0x1.fffffffffffffp+52L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -2.0, 0x1.fffffffffffffp+53L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -2.0, 0x1.fffffffffffffffep+63L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -2.0, 0x1.fffffffffffffffep+64L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -2.0, 0x1.ffffffffffffffffffffffffff8p+105L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -2.0, 0x1.ffffffffffffffffffffffffff8p+106L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -2.0, 0x1.ffffffffffffffffffffffffffffp+112L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -2.0, 0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -2.0, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
|
||||
TEST_ff_f (pow, -max_value, 0.5, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
TEST_ff_f (pow, -max_value, 1.5, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
TEST_ff_f (pow, -max_value, 1000.5, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
TEST_ff_f (pow, -max_value, -2, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -max_value, -3, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -max_value, 2, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -max_value, 3, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
|
||||
TEST_ff_f (pow, -max_value, -0xffffff, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -max_value, -0x1fffffe, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -max_value, -0x1.fffffffffffffp+52L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -max_value, -0x1.fffffffffffffp+53L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -max_value, -0x1.fffffffffffffffep+63L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -max_value, -0x1.fffffffffffffffep+64L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -max_value, -0x1.ffffffffffffffffffffffffff8p+105L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -max_value, -0x1.ffffffffffffffffffffffffff8p+106L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -max_value, -0x1.ffffffffffffffffffffffffffffp+112L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -max_value, -0x1.ffffffffffffffffffffffffffffp+113L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -max_value, -max_value, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
|
||||
TEST_ff_f (pow, -max_value, 0xffffff, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -max_value, 0x1fffffe, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -max_value, 0x1.fffffffffffffp+52L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -max_value, 0x1.fffffffffffffp+53L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -max_value, 0x1.fffffffffffffffep+63L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -max_value, 0x1.fffffffffffffffep+64L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -max_value, 0x1.ffffffffffffffffffffffffff8p+105L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -max_value, 0x1.ffffffffffffffffffffffffff8p+106L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -max_value, 0x1.ffffffffffffffffffffffffffffp+112L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -max_value, 0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -max_value, max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
|
||||
TEST_ff_f (pow, -0.5, 126, 0x1p-126),
|
||||
TEST_ff_f (pow, -0.5, 127, -0x1p-127),
|
||||
TEST_ff_f (pow, -0.5, -126, 0x1p126),
|
||||
TEST_ff_f (pow, -0.5, -127, -0x1p127),
|
||||
|
||||
TEST_ff_f (pow, -0.5, -0xffffff, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -0.5, -0x1fffffe, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -0.5, -0x1.fffffffffffffp+52L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -0.5, -0x1.fffffffffffffp+53L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -0.5, -0x1.fffffffffffffffep+63L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -0.5, -0x1.fffffffffffffffep+64L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -0.5, -0x1.ffffffffffffffffffffffffff8p+105L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -0.5, -0x1.ffffffffffffffffffffffffff8p+106L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -0.5, -0x1.ffffffffffffffffffffffffffffp+112L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -0.5, -0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -0.5, -max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
|
||||
TEST_ff_f (pow, -0.5, 0xffffff, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -0.5, 0x1fffffe, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -0.5, 0x1.fffffffffffffp+52L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -0.5, 0x1.fffffffffffffp+53L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -0.5, 0x1.fffffffffffffffep+63L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -0.5, 0x1.fffffffffffffffep+64L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -0.5, 0x1.ffffffffffffffffffffffffff8p+105L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -0.5, 0x1.ffffffffffffffffffffffffff8p+106L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -0.5, 0x1.ffffffffffffffffffffffffffffp+112L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -0.5, 0x1.ffffffffffffffffffffffffffffp+113L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -0.5, max_value, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
|
||||
TEST_ff_f (pow, -min_value, 0.5, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
TEST_ff_f (pow, -min_value, 1.5, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
TEST_ff_f (pow, -min_value, 1000.5, qnan_value, INVALID_EXCEPTION|ERRNO_EDOM),
|
||||
TEST_ff_f (pow, -min_value, -2, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -min_value, -3, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
/* Allow inexact results to be considered to underflow. */
|
||||
TEST_ff_f (pow, -min_value, 1, -min_value, UNDERFLOW_EXCEPTION_OK),
|
||||
TEST_ff_f (pow, -min_value, 2, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -min_value, 3, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
|
||||
TEST_ff_f (pow, -min_value, -0xffffff, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -min_value, -0x1fffffe, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -min_value, -0x1.fffffffffffffp+52L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -min_value, -0x1.fffffffffffffp+53L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -min_value, -0x1.fffffffffffffffep+63L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -min_value, -0x1.fffffffffffffffep+64L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -min_value, -0x1.ffffffffffffffffffffffffff8p+105L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -min_value, -0x1.ffffffffffffffffffffffffff8p+106L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -min_value, -0x1.ffffffffffffffffffffffffffffp+112L, minus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
TEST_ff_f (pow, -min_value, -0x1.ffffffffffffffffffffffffffffp+113L, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -min_value, -max_value, plus_infty, OVERFLOW_EXCEPTION|ERRNO_ERANGE),
|
||||
|
||||
TEST_ff_f (pow, -min_value, 0xffffff, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -min_value, 0x1fffffe, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
#ifndef TEST_FLOAT
|
||||
TEST_ff_f (pow, -min_value, 0x1.fffffffffffffp+52L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -min_value, 0x1.fffffffffffffp+53L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
#endif
|
||||
#ifdef TEST_LDOUBLE
|
||||
# if LDBL_MANT_DIG >= 64
|
||||
TEST_ff_f (pow, -min_value, 0x1.fffffffffffffffep+63L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -min_value, 0x1.fffffffffffffffep+64L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 106
|
||||
TEST_ff_f (pow, -min_value, 0x1.ffffffffffffffffffffffffff8p+105L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -min_value, 0x1.ffffffffffffffffffffffffff8p+106L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
# if LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, -min_value, 0x1.ffffffffffffffffffffffffffffp+112L, minus_zero, UNDERFLOW_EXCEPTION),
|
||||
TEST_ff_f (pow, -min_value, 0x1.ffffffffffffffffffffffffffffp+113L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
# endif
|
||||
#endif
|
||||
TEST_ff_f (pow, -min_value, max_value, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, 10, 0.999999403953712118183885036774764444747L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, 100, 0.999994039553108359406305079606228341585L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, 1000, 0.9999403971297699052276650144650733772182L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, 0x1p24, 0.3678794302077803437135155590023422899744L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, 0x1p30, 1.603807831524924233828134753069728224044e-28L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, 0x1.234566p30, 2.374884712135295099971443365381007297732e-32L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, -10, 1.000000596046643153205170848674671339688L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, -100, 1.000005960482418779499387594989252621451L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, -1000, 1.000059606422943986382898964231519867906L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, -0x1p24, 2.7182819094701610539628664526874952929416L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, -0x1p30, 6.2351609734265057988914412331288163636075e+27L),
|
||||
TEST_ff_f (pow, 0x0.ffffffp0, -0x1.234566p30, 4.2107307141696353498921307077142537353515e+31L),
|
||||
TEST_ff_f (pow, 0x1.000002p0, 0x1p24, 7.3890552180866447284268641248075832310141L),
|
||||
TEST_ff_f (pow, 0x1.000002p0, 0x1.234566p29, 4.2107033006507495188536371520637025716256e+31L),
|
||||
TEST_ff_f (pow, 0x1.000002p0, -0x1.234566p29, 2.3749001736727769098946062325205705312166e-32L),
|
||||
|
||||
#if !defined TEST_FLOAT
|
||||
TEST_ff_f (pow, 0x0.fffffffffffff8p0L, 0x1.23456789abcdfp62L, 1.0118762747827252817436395051178295138220e-253L),
|
||||
TEST_ff_f (pow, 0x0.fffffffffffff8p0L, -0x1.23456789abcdfp62L, 9.8826311568054561811190162420900667121992e+252L),
|
||||
TEST_ff_f (pow, 0x1.0000000000001p0L, 0x1.23456789abcdfp61L, 9.8826311568044974397135026217687399395481e+252L),
|
||||
TEST_ff_f (pow, 0x1.0000000000001p0L, -0x1.23456789abcdfp61L, 1.0118762747828234466621210689458255908670e-253L),
|
||||
#endif
|
||||
|
||||
#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 64 && LDBL_MAX_EXP >= 16384
|
||||
TEST_ff_f (pow, 0x0.ffffffffffffffffp0L, 0x1.23456789abcdef0ep77L, 1.2079212226420368189981778807634890018840e-4048L),
|
||||
TEST_ff_f (pow, 0x0.ffffffffffffffffp0L, -0x1.23456789abcdef0ep77L, 8.2786855736563746280496724205839522148001e+4047L),
|
||||
TEST_ff_f (pow, 0x1.0000000000000002p0L, 0x1.23456789abcdef0ep76L, 8.2786855736563683535324500168799315131570e+4047L),
|
||||
TEST_ff_f (pow, 0x1.0000000000000002p0L, -0x1.23456789abcdef0ep76L, 1.2079212226420377344964713407722652880280e-4048L),
|
||||
#endif
|
||||
|
||||
#if defined TEST_LDOUBLE && LDBL_MANT_DIG >= 113
|
||||
TEST_ff_f (pow, 0x0.ffffffffffffffffffffffffffff8p0L, 0x1.23456789abcdef0123456789abcdp126L, 1.2079212226420440237790185999151440179953e-4048L),
|
||||
TEST_ff_f (pow, 0x0.ffffffffffffffffffffffffffff8p0L, -0x1.23456789abcdef0123456789abcdp126L, 8.2786855736563252489063231915535105363602e+4047L),
|
||||
TEST_ff_f (pow, 0x1.0000000000000000000000000001p0L, 0x1.23456789abcdef0123456789abcdp125L, 8.2786855736563252489063231915423647547782e+4047L),
|
||||
TEST_ff_f (pow, 0x1.0000000000000000000000000001p0L, -0x1.23456789abcdef0123456789abcdp125L, 1.2079212226420440237790185999167702696503e-4048L),
|
||||
#endif
|
||||
|
||||
#if defined TEST_LDOUBLE && LDBL_MAX_EXP >= 16384
|
||||
TEST_ff_f (pow, 1e4932L, 0.75L, 1e3699L),
|
||||
TEST_ff_f (pow, 1e4928L, 0.75L, 1e3696L),
|
||||
TEST_ff_f (pow, 1e4924L, 0.75L, 1e3693L),
|
||||
TEST_ff_f (pow, 1e4920L, 0.75L, 1e3690L),
|
||||
TEST_ff_f (pow, 10.0L, 4932.0L, 1e4932L),
|
||||
TEST_ff_f (pow, 10.0L, 4931.0L, 1e4931L),
|
||||
TEST_ff_f (pow, 10.0L, 4930.0L, 1e4930L),
|
||||
TEST_ff_f (pow, 10.0L, 4929.0L, 1e4929L),
|
||||
TEST_ff_f (pow, 10.0L, -4931.0L, 1e-4931L),
|
||||
TEST_ff_f (pow, 10.0L, -4930.0L, 1e-4930L),
|
||||
TEST_ff_f (pow, 10.0L, -4929.0L, 1e-4929L),
|
||||
TEST_ff_f (pow, 1e27L, 182.0L, 1e4914L),
|
||||
TEST_ff_f (pow, 1e27L, -182.0L, 1e-4914L),
|
||||
#endif
|
||||
|
||||
TEST_ff_f (pow, min_subnorm_value, min_subnorm_value, 1.0L),
|
||||
TEST_ff_f (pow, min_subnorm_value, -min_subnorm_value, 1.0L),
|
||||
TEST_ff_f (pow, max_value, min_subnorm_value, 1.0L),
|
||||
TEST_ff_f (pow, max_value, -min_subnorm_value, 1.0L),
|
||||
TEST_ff_f (pow, 0.99L, min_subnorm_value, 1.0L),
|
||||
TEST_ff_f (pow, 0.99L, -min_subnorm_value, 1.0L),
|
||||
TEST_ff_f (pow, 1.01L, min_subnorm_value, 1.0L),
|
||||
TEST_ff_f (pow, 1.01L, -min_subnorm_value, 1.0L),
|
||||
|
||||
TEST_ff_f (pow, 2.0L, -100000.0L, plus_zero, UNDERFLOW_EXCEPTION),
|
||||
AUTO_TESTS_ff_f (pow, tonearest),
|
||||
};
|
||||
|
||||
static void
|
||||
@ -11897,8 +11392,7 @@ pow_test (void)
|
||||
|
||||
static const struct test_ff_f_data pow_tonearest_test_data[] =
|
||||
{
|
||||
TEST_ff_f (pow, 1.0625L, 1.125L, 1.070582293028761362162622578677070098674L),
|
||||
TEST_ff_f (pow, 1.5L, 1.03125L, 1.519127098714743184071644334163037684948L),
|
||||
AUTO_TESTS_ff_f (pow, tonearest),
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -208,6 +208,14 @@ Test "asin_upward (1.0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
|
||||
# atan2
|
||||
Test "atan2 (-0x1.effe81f852716ffep-8, -0x7.57d1de0e5124664p-12)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "atan2 (-0x1.effe81f852717p-8, -0x7.57d1ep-12)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
# atanh
|
||||
Test "atanh (0.75)":
|
||||
ildouble: 2
|
||||
@ -6184,6 +6192,42 @@ ifloat: 1
|
||||
Test "hypot (-0.7, 12.4)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "hypot (-0xb.333333333333333p-4, -0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
Test "hypot (-0xb.333333333333333p-4, 0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
Test "hypot (-0xb.333333333333334p-4, -0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
Test "hypot (-0xb.333333333333334p-4, 0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
Test "hypot (-0xb.3333333333338p-4, -0xc.6666666666668p+0)":
|
||||
ldouble: 1
|
||||
Test "hypot (-0xb.3333333333338p-4, 0xc.6666666666668p+0)":
|
||||
ldouble: 1
|
||||
Test "hypot (-0xb.33333p-4, -0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xb.33333p-4, 0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xc.6666666666668p+0, -0xb.3333333333338p-4)":
|
||||
ldouble: 1
|
||||
Test "hypot (-0xc.6666666666668p+0, 0xb.3333333333338p-4)":
|
||||
ldouble: 1
|
||||
Test "hypot (-0xc.666666666666p+0, -0xb.333333333333333p-4)":
|
||||
ildouble: 1
|
||||
Test "hypot (-0xc.666666666666p+0, -0xb.333333333333334p-4)":
|
||||
ildouble: 1
|
||||
Test "hypot (-0xc.666666666666p+0, -0xb.33333p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xc.666666666666p+0, 0xb.333333333333333p-4)":
|
||||
ildouble: 1
|
||||
Test "hypot (-0xc.666666666666p+0, 0xb.333333333333334p-4)":
|
||||
ildouble: 1
|
||||
Test "hypot (-0xc.666666666666p+0, 0xb.33333p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-12.4, -0.7)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
@ -6196,6 +6240,52 @@ ifloat: 1
|
||||
Test "hypot (0.7, 12.4)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "hypot (0x1.23456789abcdef02p-500, 0x1.23456789abcdefp-500)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0x1.23456789abcdefp-500, 0x1.23456789abcdef02p-500)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0x1.23456789abcdefp-500, 0x1.23456789abcdfp-500)":
|
||||
ldouble: 1
|
||||
Test "hypot (0x1.23456789abcdfp-500, 0x1.23456789abcdefp-500)":
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.333333333333333p-4, -0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
Test "hypot (0xb.333333333333333p-4, 0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
Test "hypot (0xb.333333333333334p-4, -0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
Test "hypot (0xb.333333333333334p-4, 0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
Test "hypot (0xb.3333333333338p-4, -0xc.6666666666668p+0)":
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.3333333333338p-4, 0xc.6666666666668p+0)":
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.33333p-4, -0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.33333p-4, 0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xc.6666666666668p+0, -0xb.3333333333338p-4)":
|
||||
ldouble: 1
|
||||
Test "hypot (0xc.6666666666668p+0, 0xb.3333333333338p-4)":
|
||||
ldouble: 1
|
||||
Test "hypot (0xc.666666666666p+0, -0xb.333333333333333p-4)":
|
||||
ildouble: 1
|
||||
Test "hypot (0xc.666666666666p+0, -0xb.333333333333334p-4)":
|
||||
ildouble: 1
|
||||
Test "hypot (0xc.666666666666p+0, -0xb.33333p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xc.666666666666p+0, 0xb.333333333333333p-4)":
|
||||
ildouble: 1
|
||||
Test "hypot (0xc.666666666666p+0, 0xb.333333333333334p-4)":
|
||||
ildouble: 1
|
||||
Test "hypot (0xc.666666666666p+0, 0xb.33333p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (12.4, -0.7)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
@ -6607,6 +6697,15 @@ ldouble: 1
|
||||
Test "pow (0x0.ffffffp0, -0x1p24)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow (0x1.0000000000001p+0, 0x2.468adp+60)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow (0xf.ffffffffffff8p-4, 0x4.8d15ap+60)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow (0xf.fffffp-4, -0x1p+24)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
# pow10
|
||||
Test "pow10 (0.75)":
|
||||
@ -6624,6 +6723,17 @@ Test "pow_downward (1.5, 1.03125)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
|
||||
# pow_tonearest
|
||||
Test "pow_tonearest (0x1.0000000000001p+0, 0x2.468adp+60)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow_tonearest (0xf.ffffffffffff8p-4, 0x4.8d15ap+60)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow_tonearest (0xf.fffffp-4, -0x1p+24)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
# pow_towardzero
|
||||
Test "pow_towardzero (1.0625, 1.125)":
|
||||
double: 1
|
||||
@ -9724,6 +9834,10 @@ ifloat: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
Function: "atan2":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
Function: "atanh":
|
||||
ildouble: 2
|
||||
ldouble: 1
|
||||
@ -10181,6 +10295,8 @@ ldouble: 1
|
||||
Function: "hypot":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
Function: "j0":
|
||||
double: 1
|
||||
@ -10244,6 +10360,10 @@ float: 1
|
||||
idouble: 1
|
||||
ifloat: 1
|
||||
|
||||
Function: "pow_tonearest":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
Function: "pow_towardzero":
|
||||
double: 1
|
||||
float: 1
|
||||
|
@ -254,12 +254,33 @@ ldouble: 1
|
||||
Test "atan2 (-0.75, -1.0)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "atan2 (-0x1.effe81f852716ffep-8, -0x7.57d1de0e5124664p-12)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "atan2 (-0x1.effe81f852717p-8, -0x7.57d1ep-12)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "atan2 (-0x1.effe82p-8, -0x7.57d1d8p-12)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "atan2 (-0xcp-4, -0x1p+0)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "atan2 (-0xf.fffffp+124, -0x4p-128)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "atan2 (-max_value, -min_value)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "atan2 (0.75, -1.0)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "atan2 (0x1.64p+0, 0xe.ep-4)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "atan2 (0xcp-4, -0x1p+0)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "atan2 (1.390625, 0.9296875)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
@ -7119,6 +7140,42 @@ ifloat: 1
|
||||
Test "hypot (-0.7, 12.4)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "hypot (-0xb.3333333333338p-4, -0xc.6666666666668p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xb.3333333333338p-4, 0xc.6666666666668p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xb.33333p-4, -0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xb.33333p-4, 0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xb.33334p-4, -0xc.6666666666668p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
Test "hypot (-0xb.33334p-4, 0xc.6666666666668p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
Test "hypot (-0xc.6666666666668p+0, -0xb.3333333333338p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xc.6666666666668p+0, -0xb.33334p-4)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
Test "hypot (-0xc.6666666666668p+0, 0xb.3333333333338p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xc.6666666666668p+0, 0xb.33334p-4)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
Test "hypot (-0xc.666666666666p+0, -0xb.33333p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-0xc.666666666666p+0, 0xb.33333p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (-12.4, -0.7)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
@ -7131,6 +7188,54 @@ ifloat: 1
|
||||
Test "hypot (0.7, 12.4)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "hypot (0x1.23456789abcdef02p-500, 0x1.23456789abcdefp-500)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0x1.23456789abcdefp-500, 0x1.23456789abcdef02p-500)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0x1.23456789abcdefp-500, 0x1.23456789abcdfp-500)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0x1.23456789abcdfp-500, 0x1.23456789abcdefp-500)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.3333333333338p-4, -0xc.6666666666668p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.3333333333338p-4, 0xc.6666666666668p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.33333p-4, -0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.33333p-4, 0xc.666666666666p+0)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xb.33334p-4, -0xc.6666666666668p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
Test "hypot (0xb.33334p-4, 0xc.6666666666668p+0)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
Test "hypot (0xc.6666666666668p+0, -0xb.3333333333338p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xc.6666666666668p+0, -0xb.33334p-4)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
Test "hypot (0xc.6666666666668p+0, 0xb.3333333333338p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xc.6666666666668p+0, 0xb.33334p-4)":
|
||||
double: 1
|
||||
idouble: 1
|
||||
Test "hypot (0xc.666666666666p+0, -0xb.33333p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (0xc.666666666666p+0, 0xb.33333p-4)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "hypot (12.4, -0.7)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
@ -7603,9 +7708,26 @@ ldouble: 1
|
||||
Test "pow (0x0.ffffffp0, 0x1p24)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "pow (0x1.0000000000001p+0, 0x2.468adp+60)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow (0x1.000002p+0, 0x1p+24)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "pow (0x1.000002p0, 0x1p24)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "pow (0xf.ffffffffffff8p-4, 0x4.8d15ap+60)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow (0xf.fffffp-4, -0x1p+24)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow (0xf.fffffp-4, 0x1p+24)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
|
||||
# pow10
|
||||
Test "pow10 (-0x1.31p+8)":
|
||||
@ -7650,6 +7772,25 @@ Test "pow_downward (1.5, 1.03125)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
|
||||
# pow_tonearest
|
||||
Test "pow_tonearest (0x1.0000000000001p+0, 0x2.468adp+60)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow_tonearest (0x1.000002p+0, 0x1p+24)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
Test "pow_tonearest (0xf.ffffffffffff8p-4, 0x4.8d15ap+60)":
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow_tonearest (0xf.fffffp-4, -0x1p+24)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
Test "pow_tonearest (0xf.fffffp-4, 0x1p+24)":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
|
||||
# pow_towardzero
|
||||
Test "pow_towardzero (1.5, 1.03125)":
|
||||
float: 1
|
||||
@ -10944,6 +11085,8 @@ ldouble: 1
|
||||
Function: "atan2":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
Function: "atanh":
|
||||
float: 1
|
||||
@ -11436,8 +11579,12 @@ ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
Function: "hypot":
|
||||
double: 1
|
||||
float: 1
|
||||
idouble: 1
|
||||
ifloat: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
Function: "j0":
|
||||
double: 2
|
||||
@ -11507,6 +11654,12 @@ Function: "pow_downward":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
|
||||
Function: "pow_tonearest":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
ildouble: 1
|
||||
ldouble: 1
|
||||
|
||||
Function: "pow_towardzero":
|
||||
float: 1
|
||||
ifloat: 1
|
||||
|
Loading…
Reference in New Issue
Block a user