Commit Graph

20 Commits

Author SHA1 Message Date
Joseph Myers 783dd2d3af Use -std=gnu11 instead of -std=gnu99.
Now that GCC 4.7 or later is required to build glibc, this patch moves
the build from using -std=gnu99 to -std=gnu11 (option added in 4.7).
This allows use of C11 features from GCC's headers, such as new
float.h macros and max_align_t.

Tested for x86_64 and x86 (testsuite; installed stripped shared
libraries are unchanged by the patch on x86_64, while I see some
slight code reordering of no significance on x86).

	* Makeconfig (CFLAGS): Use -std=gnu11 instead of -std=gnu99.
	* Makefile ($(objpfx)c++-types-check.out): Filter out -std=gnu11
	instead of -std=gnu99.
	* configure.ac (systemtap): Test with -std=gnu11 instead of
	-std=gnu99.
	* configure: Regenerated.
	* math/gen-auto-libm-tests.c: Use -std=gnu11 instead of -std=gnu99
	in compilation command in comment.
2015-10-27 21:47:22 +00:00
Joseph Myers 9dd346ff43 Convert 113 more function definitions to prototype style (files with assertions).
This mostly automatically-generated patch converts 113 function
definitions in glibc from old-style K&R to prototype-style.  Following
my other recent such patches, this one deals with the case of function
definitions in files that either contain assertions or where grep
suggested they might contain assertions - and thus where it isn't
possible to use a simple object code comparison as a sanity check on
the correctness of the patch, because line numbers are changed.

A few such automatically-generated changes needed to be supplemented
by manual changes for the result to compile.  openat64 had a prototype
declaration with "..." but an old-style definition in
sysdeps/unix/sysv/linux/dl-openat64.c, and "..." needed adding to the
generated prototype in the definition (I've filed
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68024> for diagnosing
such cases in GCC; the old state was undefined behavior not requiring
a diagnostic, but one seems a good idea).  In addition, as Florian has
noted regparm attribute mismatches between declaration and definition
are only diagnosed for prototype definitions, and five functions
needed internal_function added to their definitions (in the case of
__pthread_mutex_cond_lock, via the macro definition of
__pthread_mutex_lock) to compile on i386.

After this patch is in, remaining old-style definitions are probably
most readily fixed manually before we can turn on
-Wold-style-definition for all builds.

Tested for x86_64 and x86 (testsuite).

	* crypt/md5-crypt.c (__md5_crypt_r): Convert to prototype-style
	function definition.
	* crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
	* crypt/sha512-crypt.c (__sha512_crypt_r): Likewise.
	* debug/backtracesyms.c (__backtrace_symbols): Likewise.
	* elf/dl-minimal.c (_itoa): Likewise.
	* hurd/hurdmalloc.c (malloc): Likewise.
	(free): Likewise.
	(realloc): Likewise.
	* inet/inet6_option.c (inet6_option_space): Likewise.
	(inet6_option_init): Likewise.
	(inet6_option_append): Likewise.
	(inet6_option_alloc): Likewise.
	(inet6_option_next): Likewise.
	(inet6_option_find): Likewise.
	* io/ftw.c (FTW_NAME): Likewise.
	(NFTW_NAME): Likewise.
	(NFTW_NEW_NAME): Likewise.
	(NFTW_OLD_NAME): Likewise.
	* libio/iofwide.c (_IO_fwide): Likewise.
	* libio/strops.c (_IO_str_init_static_internal): Likewise.
	(_IO_str_init_static): Likewise.
	(_IO_str_init_readonly): Likewise.
	(_IO_str_overflow): Likewise.
	(_IO_str_underflow): Likewise.
	(_IO_str_count): Likewise.
	(_IO_str_seekoff): Likewise.
	(_IO_str_pbackfail): Likewise.
	(_IO_str_finish): Likewise.
	* libio/wstrops.c (_IO_wstr_init_static): Likewise.
	(_IO_wstr_overflow): Likewise.
	(_IO_wstr_underflow): Likewise.
	(_IO_wstr_count): Likewise.
	(_IO_wstr_seekoff): Likewise.
	(_IO_wstr_pbackfail): Likewise.
	(_IO_wstr_finish): Likewise.
	* locale/programs/localedef.c (normalize_codeset): Likewise.
	* locale/programs/locarchive.c (add_locale_to_archive): Likewise.
	(add_locales_to_archive): Likewise.
	(delete_locales_from_archive): Likewise.
	* malloc/malloc.c (__libc_mallinfo): Likewise.
	* math/gen-auto-libm-tests.c (init_fp_formats): Likewise.
	* misc/tsearch.c (__tfind): Likewise.
	* nptl/pthread_attr_destroy.c (__pthread_attr_destroy): Likewise.
	* nptl/pthread_attr_getdetachstate.c
	(__pthread_attr_getdetachstate): Likewise.
	* nptl/pthread_attr_getguardsize.c (pthread_attr_getguardsize):
	Likewise.
	* nptl/pthread_attr_getinheritsched.c
	(__pthread_attr_getinheritsched): Likewise.
	* nptl/pthread_attr_getschedparam.c
	(__pthread_attr_getschedparam): Likewise.
	* nptl/pthread_attr_getschedpolicy.c
	(__pthread_attr_getschedpolicy): Likewise.
	* nptl/pthread_attr_getscope.c (__pthread_attr_getscope):
	Likewise.
	* nptl/pthread_attr_getstack.c (__pthread_attr_getstack):
	Likewise.
	* nptl/pthread_attr_getstackaddr.c (__pthread_attr_getstackaddr):
	Likewise.
	* nptl/pthread_attr_getstacksize.c (__pthread_attr_getstacksize):
	Likewise.
	* nptl/pthread_attr_init.c (__pthread_attr_init_2_1): Likewise.
	(__pthread_attr_init_2_0): Likewise.
	* nptl/pthread_attr_setdetachstate.c
	(__pthread_attr_setdetachstate): Likewise.
	* nptl/pthread_attr_setguardsize.c (pthread_attr_setguardsize):
	Likewise.
	* nptl/pthread_attr_setinheritsched.c
	(__pthread_attr_setinheritsched): Likewise.
	* nptl/pthread_attr_setschedparam.c
	(__pthread_attr_setschedparam): Likewise.
	* nptl/pthread_attr_setschedpolicy.c
	(__pthread_attr_setschedpolicy): Likewise.
	* nptl/pthread_attr_setscope.c (__pthread_attr_setscope):
	Likewise.
	* nptl/pthread_attr_setstack.c (__pthread_attr_setstack):
	Likewise.
	* nptl/pthread_attr_setstackaddr.c (__pthread_attr_setstackaddr):
	Likewise.
	* nptl/pthread_attr_setstacksize.c (__pthread_attr_setstacksize):
	Likewise.
	* nptl/pthread_condattr_setclock.c (pthread_condattr_setclock):
	Likewise.
	* nptl/pthread_create.c (__find_in_stack_list): Likewise.
	* nptl/pthread_getattr_np.c (pthread_getattr_np): Likewise.
	* nptl/pthread_mutex_cond_lock.c (__pthread_mutex_lock): Define to
	use internal_function.
	* nptl/pthread_mutex_init.c (__pthread_mutex_init): Convert to
	prototype-style function definition.
	* nptl/pthread_mutex_lock.c (__pthread_mutex_lock): Likewise.
	(__pthread_mutex_cond_lock_adjust): Likewise.  Use
	internal_function.
	* nptl/pthread_mutex_timedlock.c (pthread_mutex_timedlock):
	Convert to prototype-style function definition.
	* nptl/pthread_mutex_trylock.c (__pthread_mutex_trylock):
	Likewise.
	* nptl/pthread_mutex_unlock.c (__pthread_mutex_unlock_usercnt):
	Likewise.
	(__pthread_mutex_unlock): Likewise.
	* nptl_db/td_ta_clear_event.c (td_ta_clear_event): Likewise.
	* nptl_db/td_ta_set_event.c (td_ta_set_event): Likewise.
	* nptl_db/td_thr_clear_event.c (td_thr_clear_event): Likewise.
	* nptl_db/td_thr_event_enable.c (td_thr_event_enable): Likewise.
	* nptl_db/td_thr_set_event.c (td_thr_set_event): Likewise.
	* nss/makedb.c (process_input): Likewise.
	* posix/fnmatch.c (__strchrnul): Likewise.
	(__wcschrnul): Likewise.
	(fnmatch): Likewise.
	* posix/fnmatch_loop.c (FCT): Likewise.
	* posix/glob.c (globfree): Likewise.
	(__glob_pattern_type): Likewise.
	(__glob_pattern_p): Likewise.
	* posix/regcomp.c (re_compile_pattern): Likewise.
	(re_set_syntax): Likewise.
	(re_compile_fastmap): Likewise.
	(regcomp): Likewise.
	(regerror): Likewise.
	(regfree): Likewise.
	* posix/regexec.c (regexec): Likewise.
	(re_match): Likewise.
	(re_search): Likewise.
	(re_match_2): Likewise.
	(re_search_2): Likewise.
	(re_search_stub): Likewise.  Use internal_function
	(re_copy_regs): Likewise.
	(re_set_registers): Convert to prototype-style function
	definition.
	(prune_impossible_nodes): Likewise.  Use internal_function.
	* resolv/inet_net_pton.c (inet_net_pton): Convert to
	prototype-style function definition.
	(inet_net_pton_ipv4): Likewise.
	* stdlib/strtod_l.c (____STRTOF_INTERNAL): Likewise.
	* sysdeps/pthread/aio_cancel.c (aio_cancel): Likewise.
	* sysdeps/pthread/aio_suspend.c (aio_suspend): Likewise.
	* sysdeps/pthread/timer_delete.c (timer_delete): Likewise.
	* sysdeps/unix/sysv/linux/dl-openat64.c (openat64): Likewise.
	Make variadic.
	* time/strptime_l.c (localtime_r): Convert to prototype-style
	function definition.
	* wcsmbs/mbsnrtowcs.c (__mbsnrtowcs): Likewise.
	* wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Likewise.
	* wcsmbs/wcsnrtombs.c (__wcsnrtombs): Likewise.
	* wcsmbs/wcsrtombs.c (__wcsrtombs): Likewise.
2015-10-20 11:54:09 +00:00
Joseph Myers b168057aaa Update copyright dates with scripts/update-copyrights. 2015-01-02 16:29:47 +00:00
Joseph Myers 863893ec95 Test cpow in all rounding modes.
This patch enables testing of cpow in all rounding modes using
ALL_RM_TEST.  There were two reasons this was previously deferred:

* MPC has complicated rounding-mode-dependent rules for the signs of
  exact zero real or imaginary parts in the result of mpc_pow.  Annex
  G does not impose any such requirements and I don't think glibc
  should try to implement any particular logic here.  This patch adds
  support for gen-auto-libm-tests passing the IGNORE_ZERO_INF_SIGN
  flag to libm-test.inc.

* Error accumulations in some tests in non-default rounding modes
  exceed the maximum error permitted in libm-test.inc.  This patch
  marks the problem tests with xfail-rounding.  (It might be possible
  to reduce the accumulations a bit by using round-to-nearest when
  cpow calls clog, but I don't think there's much point; the
  implementation approach for cpow is fundamentally deficient, as
  discussed in the existing bug for cpow inaccuracy which can
  reasonably be considered to cover these less-inaccurate cases as
  well.  It's possible that the test "cpow 2 0 10 0" will also need
  xfail-rounding on some platforms.)

Tested x86_64 and x86 and ulps updated accordingly.

	* math/gen-auto-libm-tests.c: Document use of
	ignore-zero-inf-sign.
	(input_flag_type): Add value flag_ignore_zero_inf_sign.
	(input_flags): Add ignore-zero-inf-sign.
	(output_for_one_input_case): Handle flag_ignore_zero_inf_sign.
	* math/gen-libm-test.pl (generate_testfile): Handle
	ignore-zero-inf-sign.
	* math/auto-libm-test-in: Mark some cpow tests with
	ignore-zero-inf-sign and some with xfail-rounding.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (cpow_test): Use ALL_RM_TEST.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-06-23 20:15:14 +00:00
Joseph Myers 046651c168 Relax gen-auto-libm-tests may-underflow rules, test log1p in all rounding modes.
gen-auto-libm-tests presently allows but does not require underflow
exceptions for results with magnitude in the range (greatest
subnormal, least normal].

In some cases, the magnitude of the exact result is very slightly
above the least normal, but rounding in the implementation results in
it effectively computing an infinite-precision result that is slightly
below the least normal, so raising an underflow exception.  This is in
accordance with the documented accuracy goals, but results in
testsuite failures.

This patch changes the logic to allow underflows when the mathematical
result is up to 0.5ulp above the least normal (so in any case where
the round-to-nearest result is the least normal).  Ideally underflows
in all these cases would be accepted only when an underflow with the
actual result is consistent with the rounding mode (in FE_TOWARDZERO
mode, a return value of the least normal implies that the
infinite-precision result did not underflow so there should be no
underflow exception, for example), so as to match the documented goals
more precisely - whereas at present the tests for exceptions are
completely independent of the tests of the returned values.  (The same
applies to overflow exceptions as well - they too should be checked
for consistency with the result, as in FE_TOWARDZERO mode a result
1ulp below the largest finite value should be inconsistent with an
overflow exception and cause a failure with overflow rather than
simply being considered a 1ulp error when overflow is expected.)  But
the present patch at least deals with the cases causing spurious
failures so that (a) certain existing tests no longer need to be
marked as having spurious exceptions (such markings in
auto-libm-test-in end up applying to more cases than just those they
are needed for) and (b) log1p can be tested in all rounding modes
without introducing more such failures.  This patch duly moves tests
of log1p to ALL_RM_TEST.

Tested x86_64 and x86 and ulps updated accordingly.

	[BZ #16357]
	[BZ #16599]
	* math/gen-auto-libm-tests.c (fp_format_desc): Add field
	min_plus_half.
	(fp_formats): Update initializers.
	(init_fp_formats): Initialize new field.
	(output_for_one_input_case): Allow underflow for results up to
	min_plus_half.
	* math/libm-test.inc (log1p_test): Use ALL_RM_TEST.
	* math/auto-libm-test-in: Don't mark some underflows from asin and
	atanh as spurious.
	* math/auto-libm-test-out: Regenerated.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-03-25 12:26:06 +00:00
Joseph Myers aa97dee16e Adjust how gen-auto-libm-tests handles before-rounding/after-rounding cases.
This patch changes gen-auto-libm-tests so that, when generating test
results that depend on whether the architecture has before-rounding or
after-rounding tininess detection, the :before-rounding or
:after-rounding conditions go on the exception / errno flags
generated, rather than generating two separate lines in
auto-libm-test-out for e.g. flt-32:before-rounding and
flt-32:after-rounding.

The rationale for this is as follows.  It would be desirable for
testing a libm function in all rounding modes to require just one
function and array in libm-test.inc, not four (or five), with the
array of test data including expected results for all rounding modes
rather than separate arrays for each rounding mode that also need to
repeat all the test inputs.  For gen-libm-test.pl to generate data for
such an array from auto-libm-test-out, it would be helpful if each
(format, test input) pair has exactly four lines in
auto-libm-test-out, one for each rounding mode, rather than some
rounding modes having just one line and some having two because the
exceptions depend on tininess detection.

Tested x86_64 and x86.

	* math/gen-auto-libm-tests.c: Update comment on output format.
	(output_for_one_input_case): Generate before-rounding and
	after-rounding information as conditions on output flags not
	floating-point format.
	* math/auto-libm-test-out: Regenerated.
	* math/gen-libm-test.pl (cond_value): New function.
	(or_cond_value): Use cond_value.
	(generate_testfile): Handle conditional exceptions.
2014-03-06 14:11:19 +00:00
Joseph Myers c6af2d896c Move tests of fma from libm-test.inc to auto-libm-test-in.
This patch moves tests of fma to auto-libm-test-in, adding the
required support to gen-auto-libm-tests.

Because fma can have exact zero results depending on the rounding
mode, results of fma cannot always be determined from a single value
computed in higher precision with a sticky bit.  Thus, this patch adds
support for recomputing results with the original MPFR/MPC function in
the case where an exact zero is involved.  (This also affects some
results for cpow; when we start testing cpow in all rounding modes, I
think it will be most appropriate to make those tests use
IGNORE_ZERO_INF_SIGN, since ISO C does not attempt to determine signs
of zero results, or special caes in general, for cpow, and I think
signs of zero for cpow are beyond the scope of glibc's accuracy
goals.)

Simply treating the existing test inputs for fma like those for other
functions (i.e., as representing the given value rounded up or down to
any of the supported floating-point formats) increases the size of
auto-libm-test-out by about 16MB (i.e., about half the file is fma
test data).  While rounded versions of tests are perfectly reasonable
test inputs for fma, in this case having them seems excessive, so this
patch allows functions to specify in gen-auto-libm-tests that the
given test inputs are only to be interpreted exactly, not as
corresponding to values rounded up and down.  This reduces the size of
the generated test data for fma to a more reasonable 2MB.

A consequence of this patch is that fma is now tested for correct
presence or absence of "inexact" exceptions, where previously this
wasn't tested because I didn't want to try to add that test coverage
manually to all the existing tests.  As far as I know, the existing
fma implementations are already correct in this regard.

This patch provides the first cases where the gen-auto-libm-tests
support for distinguishing before-rounding/after-rounding underflow
actually produces separate entries in auto-libm-test-out (for
functions without exactly determined results, the affected cases are
all considered underflow-optional, so this only affects functions like
fma with exactly determined results).  I didn't see any signs of
problems with this logic in the output.

Tested x86_64 and x86.

	* math/auto-libm-test-in: Add tests of fma.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (fma_test_data): Use AUTO_TESTS_fff_f.
	(fma_towardzero_test_data): Likewise.
	(fma_downward_test_data): Likewise.
	(fma_upward_test_data): Likewise.
	* math/gen-auto-libm-tests.c (rounding_mode_desc): Add field
	mpc_mode.
	(rounding_modes): Add values for new field.
	(func_calc_method): Add value mpfr_fff_f.
	(func_calc_desc): Add mpfr_fff_f union field.
	(test_function): Add field exact_args.
	(FUNC): Add macro argument EXACT_ARGS.
	(FUNC_mpfr_f_f): Update call to FUNC.
	(FUNC_mpfr_f_f): Likewise.
	(FUNC_mpfr_ff_f): Likewise.
	(FUNC_mpfr_if_f): Likewise.
	(FUNC_mpc_c_f): Likewise.
	(FUNC_mpc_c_c): Likewise.
	(test_functions): Add fma.  Update calls to FUNC.
	(handle_input_arg): Add argument exact_args.
	(add_test): Update call to handle_input_arg.
	(calc_generic_results): Add argument mode.  Handle mpfr_fff_f.
	(output_for_one_input_case): Update call to calc_generic_results.
	Recalculate exact zero results in each rounding mode.
2014-02-18 21:48:51 +00:00
Joseph Myers a4fb786185 Fix gen-auto-libm-tests sticky bit setting for negative results.
gen-auto-libm-tests has a bug in the logic for setting a sticky bit
based on the ternary value from MPFR: it is correct for positive
results, but for negative results mpz_setbit acts as if a two's
complement representation is used, whereas the low bit needs setting
based on the sign-magnitude representation GMP actually uses.  (This
showed up in converting fma tests to use auto-libm-test-in /
gen-auto-libm-tests.)

This patch fixes the problem by negating the mpz_t value to set its
low bit.  There are lots of changes to auto-libm-test-out (mainly 1ulp
fixes to ldbl-128 expected results), but only a few ulps updates are
needed on x86 / x86_64.  In one case, a corrected expectation showed
up a spurious underflow exception where the correct result is slightly
outside the underflowing range.

Tested x86_64 and x86 and ulps updated accordingly.

	* math/gen-auto-libm-tests.c (adjust_real): Ensure integers are
	non-negative before setting low bit.
	* math/auto-libm-test-in: Mark one asin test possibly having
	spurious underflow.
	* math/auto-libm-test-out: Regenerated.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2014-02-18 14:45:41 +00:00
Allan McRae d4697bc93d Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Joseph Myers b7867a3bfb Move tests of cpow from libm-test.inc to auto-libm-test-in.
This patch moves tests of cpow to auto-libm-test-in, adding the
required support to gen-auto-libm-tests.

Tested x86_64 and x86 and ulps updated accordingly.

	* math/auto-libm-test-in: Add tests of cpow.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (cpow_test_data): Use AUTO_TESTS_cc_c.
	* * math/gen-auto-libm-tests.c (func_calc_method): Add value
	mpc_cc_c.
	(func_calc_desc): Add mpc_cc_c union field.
	(test_functions): Add cpow.
	(special_fill_2pi): New function.
	(special_real_inputs): Add 2pi.
	(calc_generic_results): Handle mpc_cc_c.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-20 12:35:10 +00:00
Joseph Myers 7fda568229 Move various TEST_c_c tests from libm-test.inc to auto-libm-test-inc.
This patch moves tests of ccos, ccosh, cexp, clog, csqrt, ctan and
ctanh to auto-libm-test-in, adding the required support to
gen-auto-libm-tests.  Other TEST_c_c functions aren't moved for now
(although the relevant table entries are put in gen-auto-libm-tests
for it to know how to handle them): clog10 because of a known MPC bug
causing it to hang for at least some pure imaginary inputs (fixed in
SVN, but I'd rather not rely on unreleased versions of MPFR or MPC
even if relying on very recent releases); the inverse trig and
hyperbolic functions because of known slowness in special cases; and
csin / csinh because of observed slowness that I need to investigate
and report to the MPC maintainers.  Slowness can be bypassed by moving
to incremental generation (only for new / changed tests) rather than
regenerating the whole of auto-libm-test-out every time, but that
needs implementing.  (This patch takes the time for running
gen-auto-libm-tests from about one second to seven, on my system,
which I think is reasonable.  The slow functions would make it take
several minutes at least, which seems unreasonable.)

Tested x86_64 and x86 and ulps updated accordingly.

	* math/auto-libm-test-in: Add tests of ccos, ccosh, cexp, clog,
	csqrt, ctan and ctanh.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (TEST_COND_x86_64): New macro.
	(TEST_COND_x86): Likewise.
	(ccos_test_data): Use AUTO_TESTS_c_c.
	(ccosh_test_data): Likewise.
	(cexp_test_data): Likewise.
	(clog_test_data): Likewise.
	(csqrt_test_data): Likewise.
	(ctan_test_data): Likewise.
	(ctan_tonearest_test_data): Likewise.
	(ctan_towardzero_test_data): Likewise.
	(ctan_downward_test_data): Likewise.
	(ctan_upward_test_data): Likewise.
	(ctanh_test_data): Likewise.
	(ctanh_tonearest_test_data): Likewise.
	(ctanh_towardzero_test_data): Likewise.
	(ctanh_downward_test_data): Likewise.
	(ctanh_upward_test_data): Likewise.
	* math/gen-auto-libm-tests.c (func_calc_method): Add value
	mpc_c_c.
	(func_calc_desc): Add mpc_c_c union field.
	(FUNC_mpc_c_c): New macro.
	(test_functions): Add cacos, cacosh, casin, casinh, catan, catanh,
	ccos, ccosh, cexp, clog, clog10, csin, csinh, csqrt, ctan and
	ctanh.
	(special_fill_min_subnorm_p120): New function.
	(special_real_inputs): Add min_subnorm_p120.
	(calc_generic_results): Handle mpc_c_c.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-20 12:32:44 +00:00
Joseph Myers 64a17f1add Move tests of cabs and carg from libm-test.inc to auto-libm-test-in.
This patch moves tests of cabs and carg to auto-libm-test-in, adding
the required support to gen-auto-libm-tests.

Tested x86_64 and x86; no ulps updates needed.

	* math/auto-libm-test-in: Add tests of cabs and carg.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (cabs_test_data): Use AUTO_TESTS_c_f.
	(carg_test_data): Likewise.
	* math/gen-auto-libm-tests.c (func_calc_method): Add value
	mpc_c_f.
	(func_calc_desc): Add mpc_c_f union field.
	(test_functions): Add cabs and carg.
	(calc_generic_results): Handle mpc_c_f.
2013-12-19 21:28:30 +00:00
Joseph Myers 6f6fc48226 Move tests of sincos from libm-test.inc to auto-libm-test-in.
This patch moves tests of sincos to auto-libm-test-in, adding the
required support to gen-auto-libm-tests.

Tested x86_64 and x86 and ulps updated accordingly.

(auto-libm-test-out diffs omitted below.)

	* math/auto-libm-test-in: Add tests of sincos.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (sincos_test_data): Use AUTO_TESTS_fFF_11.
	* math/gen-auto-libm-tests.c (func_calc_method): Add value
	mpfr_f_11.
	(func_calc_desc): Add mpfr_f_11 union field.
	(test_functions): Add sincos.
	(calc_generic_results): Handle mpfr_f_11.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-19 17:21:01 +00:00
Joseph Myers f889953b44 Move tests of jn and yn from libm-test.inc to auto-libm-test-in.
This patch moves tests of jn and yn to auto-libm-test-in, adding the
required support for gen-auto-libm-tests (and adding a missing
assertion there and fixing logic that was broken for functions with
integer arguments).

Tested x86_64 and x86 and ulps updated accordingly.

	* math/auto-libm-test-in: Add tests of jn and yn.
	* math/auto-libm-test-out: Regenerated.
	* math/libm-test.inc (jn_test_data): Use AUTO_TESTS_if_f.
	(yn_test_data): Likewise.
	* math/gen-auto-libm-tests.c (func_calc_method): Add value
	mpfr_if_f.
	(func_calc_desc): Add mpfr_if_f union field.
	(FUNC_mpfr_if_f): New macro.
	(test_functions): Add jn and yn.
	(calc_generic_results): Assert type of second input for
	mpfr_ff_f.  Handle mpfr_if_f.
	(output_for_one_input_case): Disable all checking for arguments
	fitting floating-point types in case of an integer argument.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
2013-12-18 17:59:29 +00:00
Joseph Myers ff362e5b93 Move tests of atan2, hypot and pow from libm-test.inc to auto-libm-test-in. 2013-12-16 21:18:07 +00:00
Joseph Myers 9f0be4f8b5 Move tests of lgamma from libm-test.inc to auto-libm-test-in. 2013-12-08 23:56:28 +00:00
Joseph Myers bbf37bdc12 Move TEST_f_f tests for [l-y]* functions from libm-test.inc to auto-libm-test-in. 2013-12-05 13:54:50 +00:00
Joseph Myers d8e2dbe3e3 Move TEST_f_f tests for [e-j]* functions from libm-test.inc to auto-libm-test-in. 2013-12-03 16:22:49 +00:00
Joseph Myers 176b0c7913 Move TEST_f_f tests for [a-c]* functions from libm-test.inc to auto-libm-test-in. 2013-11-30 22:04:13 +00:00
Joseph Myers ffb536d0ac Start generating libm tests automatically with MPFR. 2013-11-29 16:27:55 +00:00