about summary refs log tree commit diff
path: root/math/w_tgamma.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-03-18 18:47:46 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-03-18 18:47:46 +0000
commitb29b6bb8fedf573ffe73147a07c851c1b6135adc (patch)
tree0b7768c38a424892edfca21a6a056963c3441fde /math/w_tgamma.c
parentc8f8fa150490ff7d08d3ea8bd9c6dda7d63e2103 (diff)
downloadglibc-b29b6bb8fedf573ffe73147a07c851c1b6135adc.tar.gz
glibc-b29b6bb8fedf573ffe73147a07c851c1b6135adc.tar.xz
glibc-b29b6bb8fedf573ffe73147a07c851c1b6135adc.zip
Test scalbn and scalbln in all rounding modes, add more tests of negative arguments.
Continuing the move to systematically testing libm functions in all
rounding modes with ALL_RM_TEST, this patch converts the tests of
scalbn and scalbln to use that macro.

Those tests include cases of underflow and overflow, meaning the
expected results depend on the rounding mode.  For convenience in
writing such tests manually, the patch adds the notation plus_oflow,
minus_oflow, plus_uflow and minus_uflow for overflowing / underflowing
results of each sign appropriate to the rounding mode being used, and
gen-libm-test.pl is made to substitute in the appropriate values.  The
tests of underflow and overflow are extended to include negative
arguments to provide better coverage (otherwise minus_oflow and
minus_uflow wouldn't have been used at all).

(A subsequent patch will make ldexp use the scalbn tests, as those
functions are equivalent for binary floating point.)

Tested x86_64 and x86.

	* math/gen-libm-test.pl (parse_args): Handle plus_oflow,
	minus_oflow, plus_uflow and minus_uflow in expected results.
	* math/libm-test.inc (scalbn_test_data): Add more tests of
	negative arguments.  Use plus_oflow, minus_oflow, plus_uflow and
	minus_uflow.
	(scalbn_test): Use ALL_RM_TEST.
	(scalbln_test_data): Add more tests of negative arguments.  Use
	plus_oflow, minus_oflow, plus_uflow and minus_uflow.
	(scalbln_test): Use ALL_RM_TEST.
Diffstat (limited to 'math/w_tgamma.c')
0 files changed, 0 insertions, 0 deletions