gcc/libstdc++-v3/testsuite
Jonathan Wakely 4f75543dc4 PR libstdc++/61761 fix std::proj for targets without C99 cproj
The current generic implementation of __complex_proj used when cproj is
not available calculates the wrong projection, giving a different result
than given by C99's cproj.

When C99 cproj is not available but isinf and copysign are, use those to
give correct results for float, double and long double. Otherwise, and
for other specializations of std::complex, just use a generic version
that returns its argument, and so doesn't support infinities.

We might want to consider adding additional overloads of __complex_proj
to support extended types such as _Float64x, _Float128 etc.

	PR libstdc++/61761
	* include/std/complex (__complex_proj): Return parameter unchanged.
	[_GLIBCXX_USE_C99_COMPLEX] (__complex_proj): Change overloads for
	floating-point types to take std::complex arguments.
	[_GLIBCXX_USE_C99_MATH_TR1] (__complex_proj): Add overloads for
	floating-point types.
	* testsuite/26_numerics/complex/proj.cc: New test.

From-SVN: r270759
2019-05-01 01:08:36 +01:00
..
17_intro libstdc++-v3 Skip tests on Darwin8-10. 2019-04-21 08:14:47 +00:00
18_support P0482R5 char8_t: Updates to existing standard library tests 2019-02-22 01:16:08 +00:00
19_diagnostics Update copyright years. 2019-01-01 13:31:55 +01:00
20_util Adding noexcept-specification on tuple constructors (LWG 2899) 2019-04-29 00:17:50 +03:00
21_strings Fix tests that fail with _GLIBCXX_USE_CXX11_ABI=0 2019-04-26 16:02:02 +01:00
22_locale P0482R5 char8_t: Updates to existing standard library tests 2019-02-22 01:16:08 +00:00
23_containers PR c++/90047 - ICE with enable_if alias template. 2019-04-17 23:32:24 -04:00
24_iterators Update copyright years. 2019-01-01 13:31:55 +01:00
25_algorithms PR libstdc++/87982 Fix generate_n and fill_n use of _Size parameter 2019-04-29 13:12:43 +01:00
26_numerics PR libstdc++/61761 fix std::proj for targets without C99 cproj 2019-05-01 01:08:36 +01:00
27_io Fix filesystem::path tests 2019-04-30 11:39:59 +01:00
28_regex PR libstdc++/89023 fix test that fails when <omp.h> not available 2019-02-11 12:56:59 +00:00
29_atomics Change test to use const variables instead of macros 2019-03-11 13:46:09 +00:00
30_threads Fix tests that fail in C++2a mode 2019-01-29 00:47:32 +00:00
abi Update copyright years. 2019-01-01 13:31:55 +01:00
backward Update copyright years. 2019-01-01 13:31:55 +01:00
config Update copyright years. 2019-01-01 13:31:55 +01:00
data
decimal Update copyright years. 2019-01-01 13:31:55 +01:00
experimental Fix filesystem::path tests 2019-04-30 11:39:59 +01:00
ext P0482R5 char8_t: New standard library tests 2019-02-19 02:55:05 +00:00
lib Fix typo in effective-target check 2019-04-10 15:46:03 +01:00
libstdc++-abi Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-dg Update copyright years. 2019-01-01 13:31:55 +01:00
libstdc++-prettyprinters Fix failing prettyprinter test 2019-01-09 10:46:52 +00:00
libstdc++-xmethods Update copyright years. 2019-01-01 13:31:55 +01:00
performance Update copyright years. 2019-01-01 13:31:55 +01:00
special_functions PR libstdc++/86655 - std::assoc_legendre should not constrain 2019-03-06 13:38:32 +00:00
tr1 PR libstdc++/86655 - std::assoc_legendre should not constrain 2019-03-06 13:38:32 +00:00
tr2 Update copyright years. 2019-01-01 13:31:55 +01:00
util PR libstdc++/90239 use uses_allocator_construction_args in <scoped_allocator> 2019-04-25 23:43:15 +01:00
Makefile.am Update copyright years. 2019-01-01 13:31:55 +01:00
Makefile.in PR libstdc++/89466 avoid slow xsltproc command in configure 2019-02-27 11:25:44 +00:00