aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite
diff options
context:
space:
mode:
authorPaolo Carlini <pcarlini@suse.de>2006-03-10 13:24:57 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2006-03-10 13:24:57 +0000
commit9a7ab578fb581fd0885c7841706876315b1bbc4b (patch)
tree6115e2c2f2b494731a1f82cf33bdde9825984c6e /libstdc++-v3/testsuite
parent7a6164d4fe7e5b85de6fe9f469b34e630c9589da (diff)
downloadgcc-9a7ab578fb581fd0885c7841706876315b1bbc4b.zip
gcc-9a7ab578fb581fd0885c7841706876315b1bbc4b.tar.gz
gcc-9a7ab578fb581fd0885c7841706876315b1bbc4b.tar.bz2
cmath: Add atan2 and pow bits; add using declarations.
2006-03-10 Paolo Carlini <pcarlini@suse.de> * include/tr1/cmath: Add atan2 and pow bits; add using declarations. * include/tr1/math.h: Add using declarations. * include/tr1/complex: Add using declarations. * testsuite/tr1/8_c_compatibility/cmath/functions.cc: Fully qualify calls. * testsuite/tr1/8_c_compatibility/cmath/overloads.cc: Likewise; add atan2 and pow bits. * testsuite/tr1/8_c_compatibility/complex/overloads_float.cc: Likewise. * testsuite/tr1/8_c_compatibility/complex/overloads_int.cc: Likewise; adjust polar bits. * acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Add checks for double_t and float_t typedefs. * include/tr1/cmath: Add double_t and float_t. * testsuite/tr1/8_c_compatibility/cmath/types.cc: New. * include/tr1/ctgmath: New. * include/tr1/tgmath.h: Likewise. * include/Makefile.am: Add. * testsuite/tr1/headers.cc: Update. * include/Makefile.in: Regenerate. * configure: Likewise. * docs/html/ext/tr1.html: Update. From-SVN: r111931
Diffstat (limited to 'libstdc++-v3/testsuite')
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/functions.cc210
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads.cc413
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/types.cc35
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_float.cc106
-rw-r--r--libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_int.cc83
-rw-r--r--libstdc++-v3/testsuite/tr1/headers.cc2
6 files changed, 454 insertions, 395 deletions
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/functions.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/functions.cc
index a0949fa..3bb6d9d 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/functions.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/functions.cc
@@ -43,145 +43,145 @@ void test01()
long lret;
long long llret;
- ret = acosh(d0);
- fret = acoshf(f0);
- ldret = acoshl(ld0);
+ ret = std::tr1::acosh(d0);
+ fret = std::tr1::acoshf(f0);
+ ldret = std::tr1::acoshl(ld0);
- ret = asinh(d0);
- fret = asinhf(f0);
- ldret = asinhl(ld0);
+ ret = std::tr1::asinh(d0);
+ fret = std::tr1::asinhf(f0);
+ ldret = std::tr1::asinhl(ld0);
- ret = atanh(d0);
- fret = atanhf(f0);
- ldret = atanhl(ld0);
+ ret = std::tr1::atanh(d0);
+ fret = std::tr1::atanhf(f0);
+ ldret = std::tr1::atanhl(ld0);
- ret = cbrt(d0);
- fret = cbrtf(f0);
- ldret = cbrtl(ld0);
+ ret = std::tr1::cbrt(d0);
+ fret = std::tr1::cbrtf(f0);
+ ldret = std::tr1::cbrtl(ld0);
- ret = copysign(d0, d0);
- fret = copysignf(f0, f0);
- ldret = copysignl(ld0, ld0);
+ ret = std::tr1::copysign(d0, d0);
+ fret = std::tr1::copysignf(f0, f0);
+ ldret = std::tr1::copysignl(ld0, ld0);
- ret = erf(d0);
- fret = erff(f0);
- ldret = erfl(ld0);
+ ret = std::tr1::erf(d0);
+ fret = std::tr1::erff(f0);
+ ldret = std::tr1::erfl(ld0);
- ret = erfc(d0);
- fret = erfcf(f0);
- ldret = erfcl(ld0);
+ ret = std::tr1::erfc(d0);
+ fret = std::tr1::erfcf(f0);
+ ldret = std::tr1::erfcl(ld0);
- ret = exp2(d0);
- fret = exp2f(f0);
- ldret = exp2l(ld0);
+ ret = std::tr1::exp2(d0);
+ fret = std::tr1::exp2f(f0);
+ ldret = std::tr1::exp2l(ld0);
- ret = expm1(d0);
- fret = expm1f(f0);
- ldret = expm1l(ld0);
+ ret = std::tr1::expm1(d0);
+ fret = std::tr1::expm1f(f0);
+ ldret = std::tr1::expm1l(ld0);
- ret = fdim(d0, d0);
- fret = fdimf(f0, f0);
- ldret = fdiml(ld0, ld0);
+ ret = std::tr1::fdim(d0, d0);
+ fret = std::tr1::fdimf(f0, f0);
+ ldret = std::tr1::fdiml(ld0, ld0);
- ret = fma(d0, d0, d0);
- fret = fmaf(f0, f0, f0);
- ldret = fmal(ld0, ld0, ld0);
+ ret = std::tr1::fma(d0, d0, d0);
+ fret = std::tr1::fmaf(f0, f0, f0);
+ ldret = std::tr1::fmal(ld0, ld0, ld0);
- ret = fmax(d0, d0);
- fret = fmaxf(f0, f0);
- ldret = fmaxl(ld0, ld0);
+ ret = std::tr1::fmax(d0, d0);
+ fret = std::tr1::fmaxf(f0, f0);
+ ldret = std::tr1::fmaxl(ld0, ld0);
- ret = fmin(d0, d0);
- fret = fminf(f0, f0);
- ldret = fminl(ld0, ld0);
+ ret = std::tr1::fmin(d0, d0);
+ fret = std::tr1::fminf(f0, f0);
+ ldret = std::tr1::fminl(ld0, ld0);
- ret = hypot(d0, d0);
- fret = hypotf(f0, f0);
- ldret = hypotl(ld0, ld0);
+ ret = std::tr1::hypot(d0, d0);
+ fret = std::tr1::hypotf(f0, f0);
+ ldret = std::tr1::hypotl(ld0, ld0);
- iret = ilogb(d0);
- iret = ilogbf(f0);
- iret = ilogbl(ld0);
+ iret = std::tr1::ilogb(d0);
+ iret = std::tr1::ilogbf(f0);
+ iret = std::tr1::ilogbl(ld0);
- ret = lgamma(d0);
- fret = lgammaf(f0);
- ldret = lgammal(ld0);
+ ret = std::tr1::lgamma(d0);
+ fret = std::tr1::lgammaf(f0);
+ ldret = std::tr1::lgammal(ld0);
- llret = llrint(d0);
- llret = llrintf(f0);
- llret = llrintl(ld0);
+ llret = std::tr1::llrint(d0);
+ llret = std::tr1::llrintf(f0);
+ llret = std::tr1::llrintl(ld0);
- llret = llround(d0);
- llret = llroundf(f0);
- llret = llroundl(ld0);
+ llret = std::tr1::llround(d0);
+ llret = std::tr1::llroundf(f0);
+ llret = std::tr1::llroundl(ld0);
- ret = log1p(d0);
- fret = log1pf(f0);
- ldret = log1pl(ld0);
+ ret = std::tr1::log1p(d0);
+ fret = std::tr1::log1pf(f0);
+ ldret = std::tr1::log1pl(ld0);
- ret = log2(d0);
- fret = log2f(f0);
- ldret = log2l(ld0);
+ ret = std::tr1::log2(d0);
+ fret = std::tr1::log2f(f0);
+ ldret = std::tr1::log2l(ld0);
- ret = logb(d0);
- fret = logbf(f0);
- ldret = logbl(ld0);
+ ret = std::tr1::logb(d0);
+ fret = std::tr1::logbf(f0);
+ ldret = std::tr1::logbl(ld0);
- lret = lrint(d0);
- lret = lrintf(f0);
- lret = lrintl(ld0);
+ lret = std::tr1::lrint(d0);
+ lret = std::tr1::lrintf(f0);
+ lret = std::tr1::lrintl(ld0);
- lret = lround(d0);
- lret = lroundf(f0);
- lret = lroundl(ld0);
+ lret = std::tr1::lround(d0);
+ lret = std::tr1::lroundf(f0);
+ lret = std::tr1::lroundl(ld0);
- ret = nan(str);
- fret = nanf(str);
- ldret = nanl(str);
+ ret = std::tr1::nan(str);
+ fret = std::tr1::nanf(str);
+ ldret = std::tr1::nanl(str);
- ret = nearbyint(d0);
- fret = nearbyintf(f0);
- ldret = nearbyintl(ld0);
+ ret = std::tr1::nearbyint(d0);
+ fret = std::tr1::nearbyintf(f0);
+ ldret = std::tr1::nearbyintl(ld0);
- ret = nextafter(d0, d0);
- fret = nextafterf(f0, f0);
- ldret = nextafterl(ld0, ld0);
+ ret = std::tr1::nextafter(d0, d0);
+ fret = std::tr1::nextafterf(f0, f0);
+ ldret = std::tr1::nextafterl(ld0, ld0);
- ret = nexttoward(d0, ld0);
- fret = nexttowardf(f0, ld0);
- ldret = nexttowardl(ld0, ld0);
+ ret = std::tr1::nexttoward(d0, ld0);
+ fret = std::tr1::nexttowardf(f0, ld0);
+ ldret = std::tr1::nexttowardl(ld0, ld0);
- ret = remainder(d0, d0);
- fret = remainderf(f0, f0);
- ldret = remainderl(ld0, ld0);
+ ret = std::tr1::remainder(d0, d0);
+ fret = std::tr1::remainderf(f0, f0);
+ ldret = std::tr1::remainderl(ld0, ld0);
- ret = remquo(d0, d0, pquo);
- fret = remquo(f0, f0, pquo);
- ldret = remquo(ld0, ld0, pquo);
+ ret = std::tr1::remquo(d0, d0, pquo);
+ fret = std::tr1::remquo(f0, f0, pquo);
+ ldret = std::tr1::remquo(ld0, ld0, pquo);
- ret = rint(d0);
- fret = rintf(f0);
- ldret = rintl(ld0);
+ ret = std::tr1::rint(d0);
+ fret = std::tr1::rintf(f0);
+ ldret = std::tr1::rintl(ld0);
- ret = round(d0);
- fret = roundf(f0);
- ldret = roundl(ld0);
+ ret = std::tr1::round(d0);
+ fret = std::tr1::roundf(f0);
+ ldret = std::tr1::roundl(ld0);
- ret = scalbln(d0, lex);
- fret = scalblnf(f0, lex);
- ldret = scalblnl(ld0, lex);
+ ret = std::tr1::scalbln(d0, lex);
+ fret = std::tr1::scalblnf(f0, lex);
+ ldret = std::tr1::scalblnl(ld0, lex);
- ret = scalbn(d0, ex);
- fret = scalbnf(f0, ex);
- ldret = scalbnl(ld0, ex);
+ ret = std::tr1::scalbn(d0, ex);
+ fret = std::tr1::scalbnf(f0, ex);
+ ldret = std::tr1::scalbnl(ld0, ex);
- ret = tgamma(d0);
- fret = tgammaf(f0);
- ldret = tgammal(ld0);
+ ret = std::tr1::tgamma(d0);
+ fret = std::tr1::tgammaf(f0);
+ ldret = std::tr1::tgammal(ld0);
- ret = trunc(d0);
- fret = truncf(f0);
- ldret = truncl(ld0);
+ ret = std::tr1::trunc(d0);
+ fret = std::tr1::truncf(f0);
+ ldret = std::tr1::truncl(ld0);
#endif
}
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads.cc
index e54a8e3..e9253400 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/overloads.cc
@@ -29,7 +29,6 @@ void test01()
{
#if _GLIBCXX_USE_C99_MATH_TR1
- using namespace std::tr1;
using namespace __gnu_test;
double d0 = 0.0;
@@ -40,202 +39,222 @@ void test01()
long lex = 0l;
int ex = 0;
- check_ret_type<double>(acosh(d0));
- check_ret_type<float>(acosh(f0));
- check_ret_type<long double>(acosh(ld0));
- check_ret_type<double>(acosh(i0));
-
- check_ret_type<double>(asinh(d0));
- check_ret_type<float>(asinh(f0));
- check_ret_type<long double>(asinh(ld0));
- check_ret_type<double>(asinh(i0));
-
- check_ret_type<double>(atanh(d0));
- check_ret_type<float>(atanh(f0));
- check_ret_type<long double>(atanh(ld0));
- check_ret_type<double>(atanh(i0));
-
- check_ret_type<double>(cbrt(d0));
- check_ret_type<float>(cbrt(f0));
- check_ret_type<long double>(cbrt(ld0));
- check_ret_type<double>(cbrt(i0));
-
- check_ret_type<double>(copysign(d0, d0));
- check_ret_type<double>(copysign(d0, f0));
- check_ret_type<float>(copysign(f0, f0));
- check_ret_type<long double>(copysign(ld0, ld0));
- check_ret_type<long double>(copysign(ld0, d0));
- check_ret_type<double>(copysign(i0, i0));
- check_ret_type<double>(copysign(d0, i0));
-
- check_ret_type<double>(erf(d0));
- check_ret_type<float>(erf(f0));
- check_ret_type<long double>(erf(ld0));
- check_ret_type<double>(erf(i0));
-
- check_ret_type<double>(erfc(d0));
- check_ret_type<float>(erfc(f0));
- check_ret_type<long double>(erfc(ld0));
- check_ret_type<double>(erfc(i0));
-
- check_ret_type<double>(exp2(d0));
- check_ret_type<float>(exp2(f0));
- check_ret_type<long double>(exp2(ld0));
- check_ret_type<double>(exp2(i0));
-
- check_ret_type<double>(expm1(d0));
- check_ret_type<float>(expm1(f0));
- check_ret_type<long double>(expm1(ld0));
- check_ret_type<double>(expm1(i0));
-
- check_ret_type<double>(fdim(d0, d0));
- check_ret_type<double>(fdim(d0, f0));
- check_ret_type<float>(fdim(f0, f0));
- check_ret_type<long double>(fdim(ld0, ld0));
- check_ret_type<long double>(fdim(ld0, d0));
- check_ret_type<double>(fdim(i0, i0));
- check_ret_type<double>(fdim(d0, i0));
-
- check_ret_type<double>(fma(d0, d0, d0));
- check_ret_type<double>(fma(d0, f0, d0));
- check_ret_type<float>(fma(f0, f0, f0));
- check_ret_type<long double>(fma(ld0, ld0, ld0));
- check_ret_type<long double>(fma(ld0, d0, f0));
- check_ret_type<double>(fma(i0, i0, i0));
- check_ret_type<double>(fma(d0, i0, f0));
-
- check_ret_type<double>(fmax(d0, d0));
- check_ret_type<double>(fmax(d0, f0));
- check_ret_type<float>(fmax(f0, f0));
- check_ret_type<long double>(fmax(ld0, ld0));
- check_ret_type<long double>(fmax(ld0, d0));
- check_ret_type<double>(fmax(i0, i0));
- check_ret_type<double>(fmax(d0, i0));
-
- check_ret_type<double>(fmin(d0, d0));
- check_ret_type<double>(fmin(d0, f0));
- check_ret_type<float>(fmin(f0, f0));
- check_ret_type<long double>(fmin(ld0, ld0));
- check_ret_type<long double>(fmin(ld0, d0));
- check_ret_type<double>(fmin(i0, i0));
- check_ret_type<double>(fmin(d0, i0));
-
- check_ret_type<double>(hypot(d0, d0));
- check_ret_type<double>(hypot(d0, f0));
- check_ret_type<float>(hypot(f0, f0));
- check_ret_type<long double>(hypot(ld0, ld0));
- check_ret_type<long double>(hypot(ld0, d0));
- check_ret_type<double>(hypot(i0, i0));
- check_ret_type<double>(hypot(d0, i0));
-
- check_ret_type<int>(ilogb(d0));
- check_ret_type<int>(ilogb(f0));
- check_ret_type<int>(ilogb(ld0));
- check_ret_type<int>(ilogb(i0));
-
- check_ret_type<double>(lgamma(d0));
- check_ret_type<float>(lgamma(f0));
- check_ret_type<long double>(lgamma(ld0));
- check_ret_type<double>(lgamma(i0));
-
- check_ret_type<long long>(llrint(d0));
- check_ret_type<long long>(llrint(f0));
- check_ret_type<long long>(llrint(ld0));
- check_ret_type<long long>(llrint(i0));
-
- check_ret_type<long long>(llround(d0));
- check_ret_type<long long>(llround(f0));
- check_ret_type<long long>(llround(ld0));
- check_ret_type<long long>(llround(i0));
-
- check_ret_type<double>(log1p(d0));
- check_ret_type<float>(log1p(f0));
- check_ret_type<long double>(log1p(ld0));
- check_ret_type<double>(log1p(i0));
-
- check_ret_type<double>(log2(d0));
- check_ret_type<float>(log2(f0));
- check_ret_type<long double>(log2(ld0));
- check_ret_type<double>(log2(i0));
-
- check_ret_type<double>(logb(d0));
- check_ret_type<float>(logb(f0));
- check_ret_type<long double>(logb(ld0));
- check_ret_type<double>(logb(i0));
-
- check_ret_type<long>(lrint(d0));
- check_ret_type<long>(lrint(f0));
- check_ret_type<long>(lrint(ld0));
- check_ret_type<long>(lrint(i0));
-
- check_ret_type<long>(lround(d0));
- check_ret_type<long>(lround(f0));
- check_ret_type<long>(lround(ld0));
- check_ret_type<long>(lround(i0));
-
- check_ret_type<double>(nearbyint(d0));
- check_ret_type<float>(nearbyint(f0));
- check_ret_type<long double>(nearbyint(ld0));
- check_ret_type<double>(nearbyint(i0));
-
- check_ret_type<double>(nextafter(d0, d0));
- check_ret_type<double>(nextafter(d0, f0));
- check_ret_type<float>(nextafter(f0, f0));
- check_ret_type<long double>(nextafter(ld0, ld0));
- check_ret_type<long double>(nextafter(ld0, d0));
- check_ret_type<double>(nextafter(i0, i0));
- check_ret_type<double>(nextafter(d0, i0));
-
- check_ret_type<double>(nexttoward(d0, ld0));
- check_ret_type<float>(nexttoward(f0, ld0));
- check_ret_type<long double>(nexttoward(ld0, ld0));
- check_ret_type<double>(nexttoward(i0, ld0));
-
- check_ret_type<double>(remainder(d0, d0));
- check_ret_type<double>(remainder(d0, f0));
- check_ret_type<float>(remainder(f0, f0));
- check_ret_type<long double>(remainder(ld0, ld0));
- check_ret_type<long double>(remainder(ld0, d0));
- check_ret_type<double>(remainder(i0, i0));
- check_ret_type<double>(remainder(d0, i0));
-
- check_ret_type<double>(remquo(d0, d0, pquo));
- check_ret_type<double>(remquo(d0, f0, pquo));
- check_ret_type<float>(remquo(f0, f0, pquo));
- check_ret_type<long double>(remquo(ld0, ld0, pquo));
- check_ret_type<long double>(remquo(ld0, d0, pquo));
- check_ret_type<double>(remquo(i0, i0, pquo));
- check_ret_type<double>(remquo(d0, i0, pquo));
-
- check_ret_type<double>(rint(d0));
- check_ret_type<float>(rint(f0));
- check_ret_type<long double>(rint(ld0));
- check_ret_type<double>(rint(i0));
-
- check_ret_type<double>(round(d0));
- check_ret_type<float>(round(f0));
- check_ret_type<long double>(round(ld0));
- check_ret_type<double>(round(i0));
-
- check_ret_type<double>(scalbln(d0, lex));
- check_ret_type<float>(scalbln(f0, lex));
- check_ret_type<long double>(scalbln(ld0, lex));
- check_ret_type<double>(scalbln(i0, lex));
-
- check_ret_type<double>(scalbn(d0, ex));
- check_ret_type<float>(scalbn(f0, ex));
- check_ret_type<long double>(scalbn(ld0, ex));
- check_ret_type<double>(scalbn(i0, ex));
-
- check_ret_type<double>(tgamma(d0));
- check_ret_type<float>(tgamma(f0));
- check_ret_type<long double>(tgamma(ld0));
- check_ret_type<double>(tgamma(i0));
-
- check_ret_type<double>(trunc(d0));
- check_ret_type<float>(trunc(f0));
- check_ret_type<long double>(trunc(ld0));
- check_ret_type<double>(trunc(i0));
+ check_ret_type<double>(std::tr1::atan2(d0, d0));
+ check_ret_type<double>(std::tr1::atan2(d0, f0));
+ check_ret_type<float>(std::tr1::atan2(f0, f0));
+ check_ret_type<long double>(std::tr1::atan2(ld0, ld0));
+ check_ret_type<long double>(std::tr1::atan2(ld0, d0));
+ check_ret_type<double>(std::tr1::atan2(i0, i0));
+ check_ret_type<double>(std::tr1::atan2(d0, i0));
+
+ check_ret_type<double>(std::tr1::acosh(d0));
+ check_ret_type<float>(std::tr1::acosh(f0));
+ check_ret_type<long double>(std::tr1::acosh(ld0));
+ check_ret_type<double>(std::tr1::acosh(i0));
+
+ check_ret_type<double>(std::tr1::asinh(d0));
+ check_ret_type<float>(std::tr1::asinh(f0));
+ check_ret_type<long double>(std::tr1::asinh(ld0));
+ check_ret_type<double>(std::tr1::asinh(i0));
+
+ check_ret_type<double>(std::tr1::atanh(d0));
+ check_ret_type<float>(std::tr1::atanh(f0));
+ check_ret_type<long double>(std::tr1::atanh(ld0));
+ check_ret_type<double>(std::tr1::atanh(i0));
+
+ check_ret_type<double>(std::tr1::cbrt(d0));
+ check_ret_type<float>(std::tr1::cbrt(f0));
+ check_ret_type<long double>(std::tr1::cbrt(ld0));
+ check_ret_type<double>(std::tr1::cbrt(i0));
+
+ check_ret_type<double>(std::tr1::copysign(d0, d0));
+ check_ret_type<double>(std::tr1::copysign(d0, f0));
+ check_ret_type<float>(std::tr1::copysign(f0, f0));
+ check_ret_type<long double>(std::tr1::copysign(ld0, ld0));
+ check_ret_type<long double>(std::tr1::copysign(ld0, d0));
+ check_ret_type<double>(std::tr1::copysign(i0, i0));
+ check_ret_type<double>(std::tr1::copysign(d0, i0));
+
+ check_ret_type<double>(std::tr1::erf(d0));
+ check_ret_type<float>(std::tr1::erf(f0));
+ check_ret_type<long double>(std::tr1::erf(ld0));
+ check_ret_type<double>(std::tr1::erf(i0));
+
+ check_ret_type<double>(std::tr1::erfc(d0));
+ check_ret_type<float>(std::tr1::erfc(f0));
+ check_ret_type<long double>(std::tr1::erfc(ld0));
+ check_ret_type<double>(std::tr1::erfc(i0));
+
+ check_ret_type<double>(std::tr1::exp2(d0));
+ check_ret_type<float>(std::tr1::exp2(f0));
+ check_ret_type<long double>(std::tr1::exp2(ld0));
+ check_ret_type<double>(std::tr1::exp2(i0));
+
+ check_ret_type<double>(std::tr1::expm1(d0));
+ check_ret_type<float>(std::tr1::expm1(f0));
+ check_ret_type<long double>(std::tr1::expm1(ld0));
+ check_ret_type<double>(std::tr1::expm1(i0));
+
+ check_ret_type<double>(std::tr1::fdim(d0, d0));
+ check_ret_type<double>(std::tr1::fdim(d0, f0));
+ check_ret_type<float>(std::tr1::fdim(f0, f0));
+ check_ret_type<long double>(std::tr1::fdim(ld0, ld0));
+ check_ret_type<long double>(std::tr1::fdim(ld0, d0));
+ check_ret_type<double>(std::tr1::fdim(i0, i0));
+ check_ret_type<double>(std::tr1::fdim(d0, i0));
+
+ check_ret_type<double>(std::tr1::fma(d0, d0, d0));
+ check_ret_type<double>(std::tr1::fma(d0, f0, d0));
+ check_ret_type<float>(std::tr1::fma(f0, f0, f0));
+ check_ret_type<long double>(std::tr1::fma(ld0, ld0, ld0));
+ check_ret_type<long double>(std::tr1::fma(ld0, d0, f0));
+ check_ret_type<double>(std::tr1::fma(i0, i0, i0));
+ check_ret_type<double>(std::tr1::fma(d0, i0, f0));
+
+ check_ret_type<double>(std::tr1::fmax(d0, d0));
+ check_ret_type<double>(std::tr1::fmax(d0, f0));
+ check_ret_type<float>(std::tr1::fmax(f0, f0));
+ check_ret_type<long double>(std::tr1::fmax(ld0, ld0));
+ check_ret_type<long double>(std::tr1::fmax(ld0, d0));
+ check_ret_type<double>(std::tr1::fmax(i0, i0));
+ check_ret_type<double>(std::tr1::fmax(d0, i0));
+
+ check_ret_type<double>(std::tr1::fmin(d0, d0));
+ check_ret_type<double>(std::tr1::fmin(d0, f0));
+ check_ret_type<float>(std::tr1::fmin(f0, f0));
+ check_ret_type<long double>(std::tr1::fmin(ld0, ld0));
+ check_ret_type<long double>(std::tr1::fmin(ld0, d0));
+ check_ret_type<double>(std::tr1::fmin(i0, i0));
+ check_ret_type<double>(std::tr1::fmin(d0, i0));
+
+ check_ret_type<double>(std::tr1::hypot(d0, d0));
+ check_ret_type<double>(std::tr1::hypot(d0, f0));
+ check_ret_type<float>(std::tr1::hypot(f0, f0));
+ check_ret_type<long double>(std::tr1::hypot(ld0, ld0));
+ check_ret_type<long double>(std::tr1::hypot(ld0, d0));
+ check_ret_type<double>(std::tr1::hypot(i0, i0));
+ check_ret_type<double>(std::tr1::hypot(d0, i0));
+
+ check_ret_type<int>(std::tr1::ilogb(d0));
+ check_ret_type<int>(std::tr1::ilogb(f0));
+ check_ret_type<int>(std::tr1::ilogb(ld0));
+ check_ret_type<int>(std::tr1::ilogb(i0));
+
+ check_ret_type<double>(std::tr1::lgamma(d0));
+ check_ret_type<float>(std::tr1::lgamma(f0));
+ check_ret_type<long double>(std::tr1::lgamma(ld0));
+ check_ret_type<double>(std::tr1::lgamma(i0));
+
+ check_ret_type<long long>(std::tr1::llrint(d0));
+ check_ret_type<long long>(std::tr1::llrint(f0));
+ check_ret_type<long long>(std::tr1::llrint(ld0));
+ check_ret_type<long long>(std::tr1::llrint(i0));
+
+ check_ret_type<long long>(std::tr1::llround(d0));
+ check_ret_type<long long>(std::tr1::llround(f0));
+ check_ret_type<long long>(std::tr1::llround(ld0));
+ check_ret_type<long long>(std::tr1::llround(i0));
+
+ check_ret_type<double>(std::tr1::log1p(d0));
+ check_ret_type<float>(std::tr1::log1p(f0));
+ check_ret_type<long double>(std::tr1::log1p(ld0));
+ check_ret_type<double>(std::tr1::log1p(i0));
+
+ // DR 568.
+ check_ret_type<double>(std::tr1::log2(d0));
+ check_ret_type<float>(std::tr1::log2(f0));
+ check_ret_type<long double>(std::tr1::log2(ld0));
+ check_ret_type<double>(std::tr1::log2(i0));
+
+ check_ret_type<double>(std::tr1::logb(d0));
+ check_ret_type<float>(std::tr1::logb(f0));
+ check_ret_type<long double>(std::tr1::logb(ld0));
+ check_ret_type<double>(std::tr1::logb(i0));
+
+ check_ret_type<long>(std::tr1::lrint(d0));
+ check_ret_type<long>(std::tr1::lrint(f0));
+ check_ret_type<long>(std::tr1::lrint(ld0));
+ check_ret_type<long>(std::tr1::lrint(i0));
+
+ check_ret_type<long>(std::tr1::lround(d0));
+ check_ret_type<long>(std::tr1::lround(f0));
+ check_ret_type<long>(std::tr1::lround(ld0));
+ check_ret_type<long>(std::tr1::lround(i0));
+
+ check_ret_type<double>(std::tr1::nearbyint(d0));
+ check_ret_type<float>(std::tr1::nearbyint(f0));
+ check_ret_type<long double>(std::tr1::nearbyint(ld0));
+ check_ret_type<double>(std::tr1::nearbyint(i0));
+
+ check_ret_type<double>(std::tr1::nextafter(d0, d0));
+ check_ret_type<double>(std::tr1::nextafter(d0, f0));
+ check_ret_type<float>(std::tr1::nextafter(f0, f0));
+ check_ret_type<long double>(std::tr1::nextafter(ld0, ld0));
+ check_ret_type<long double>(std::tr1::nextafter(ld0, d0));
+ check_ret_type<double>(std::tr1::nextafter(i0, i0));
+ check_ret_type<double>(std::tr1::nextafter(d0, i0));
+
+ check_ret_type<double>(std::tr1::nexttoward(d0, ld0));
+ check_ret_type<float>(std::tr1::nexttoward(f0, ld0));
+ check_ret_type<long double>(std::tr1::nexttoward(ld0, ld0));
+ check_ret_type<double>(std::tr1::nexttoward(i0, ld0));
+
+ check_ret_type<double>(std::tr1::pow(d0, d0));
+ check_ret_type<double>(std::tr1::pow(d0, f0));
+ check_ret_type<float>(std::tr1::pow(f0, f0));
+ check_ret_type<long double>(std::tr1::pow(ld0, ld0));
+ check_ret_type<long double>(std::tr1::pow(ld0, d0));
+ check_ret_type<double>(std::tr1::pow(i0, i0));
+ check_ret_type<double>(std::tr1::pow(d0, i0));
+ // DR 550.
+ // check_ret_type<double>(std::tr1::pow(f0, i0));
+ check_ret_type<float>(std::tr1::pow(f0, i0));
+
+ check_ret_type<double>(std::tr1::remainder(d0, d0));
+ check_ret_type<double>(std::tr1::remainder(d0, f0));
+ check_ret_type<float>(std::tr1::remainder(f0, f0));
+ check_ret_type<long double>(std::tr1::remainder(ld0, ld0));
+ check_ret_type<long double>(std::tr1::remainder(ld0, d0));
+ check_ret_type<double>(std::tr1::remainder(i0, i0));
+ check_ret_type<double>(std::tr1::remainder(d0, i0));
+
+ check_ret_type<double>(std::tr1::remquo(d0, d0, pquo));
+ check_ret_type<double>(std::tr1::remquo(d0, f0, pquo));
+ check_ret_type<float>(std::tr1::remquo(f0, f0, pquo));
+ check_ret_type<long double>(std::tr1::remquo(ld0, ld0, pquo));
+ check_ret_type<long double>(std::tr1::remquo(ld0, d0, pquo));
+ check_ret_type<double>(std::tr1::remquo(i0, i0, pquo));
+ check_ret_type<double>(std::tr1::remquo(d0, i0, pquo));
+
+ check_ret_type<double>(std::tr1::rint(d0));
+ check_ret_type<float>(std::tr1::rint(f0));
+ check_ret_type<long double>(std::tr1::rint(ld0));
+ check_ret_type<double>(std::tr1::rint(i0));
+
+ check_ret_type<double>(std::tr1::round(d0));
+ check_ret_type<float>(std::tr1::round(f0));
+ check_ret_type<long double>(std::tr1::round(ld0));
+ check_ret_type<double>(std::tr1::round(i0));
+
+ check_ret_type<double>(std::tr1::scalbln(d0, lex));
+ check_ret_type<float>(std::tr1::scalbln(f0, lex));
+ check_ret_type<long double>(std::tr1::scalbln(ld0, lex));
+ check_ret_type<double>(std::tr1::scalbln(i0, lex));
+
+ check_ret_type<double>(std::tr1::scalbn(d0, ex));
+ check_ret_type<float>(std::tr1::scalbn(f0, ex));
+ check_ret_type<long double>(std::tr1::scalbn(ld0, ex));
+ check_ret_type<double>(std::tr1::scalbn(i0, ex));
+
+ check_ret_type<double>(std::tr1::tgamma(d0));
+ check_ret_type<float>(std::tr1::tgamma(f0));
+ check_ret_type<long double>(std::tr1::tgamma(ld0));
+ check_ret_type<double>(std::tr1::tgamma(i0));
+
+ check_ret_type<double>(std::tr1::trunc(d0));
+ check_ret_type<float>(std::tr1::trunc(f0));
+ check_ret_type<long double>(std::tr1::trunc(ld0));
+ check_ret_type<double>(std::tr1::trunc(i0));
#endif
}
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/types.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/types.cc
new file mode 100644
index 0000000..dff4b9d
--- /dev/null
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/cmath/types.cc
@@ -0,0 +1,35 @@
+// { dg-do compile }
+
+// 2006-03-10 Paolo Carlini <pcarlini@suse.de>
+//
+// Copyright (C) 2006 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+// USA.
+
+// 8.16 Additions to header <cmath>
+
+#include <tr1/cmath>
+
+void test01()
+{
+#if _GLIBCXX_USE_C99_MATH_TR1
+
+ typedef std::tr1::double_t my_double_t;
+ typedef std::tr1::float_t my_float_t;
+
+#endif
+}
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_float.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_float.cc
index 21f2d75..389f364 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_float.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_float.cc
@@ -23,13 +23,11 @@
// 8.1 Additions to header <complex>
#include <tr1/complex>
-#include <testsuite_hooks.h>
#include <testsuite_tr1.h>
void test01()
{
- using namespace std::tr1;
- using namespace __gnu_test;
+ using __gnu_test::check_ret_type;
typedef std::complex<float> cmplx_f_type;
typedef std::complex<double> cmplx_d_type;
@@ -43,63 +41,63 @@ void test01()
const cmplx_d_type c_d1(d1, d1);
const cmplx_ld_type c_ld1(ld1, ld1);
- check_ret_type<float>(arg(f1));
- check_ret_type<double>(arg(d1));
- check_ret_type<long double>(arg(ld1));
+ check_ret_type<float>(std::tr1::arg(f1));
+ check_ret_type<double>(std::tr1::arg(d1));
+ check_ret_type<long double>(std::tr1::arg(ld1));
- check_ret_type<cmplx_f_type>(conj(f1));
- check_ret_type<cmplx_d_type>(conj(d1));
- check_ret_type<cmplx_ld_type>(conj(ld1));
+ check_ret_type<cmplx_f_type>(std::tr1::conj(f1));
+ check_ret_type<cmplx_d_type>(std::tr1::conj(d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::conj(ld1));
- check_ret_type<float>(imag(f1));
- check_ret_type<double>(imag(d1));
- check_ret_type<long double>(imag(ld1));
+ check_ret_type<float>(std::tr1::imag(f1));
+ check_ret_type<double>(std::tr1::imag(d1));
+ check_ret_type<long double>(std::tr1::imag(ld1));
- check_ret_type<float>(norm(f1));
- check_ret_type<double>(norm(d1));
- check_ret_type<long double>(norm(ld1));
+ check_ret_type<float>(std::tr1::norm(f1));
+ check_ret_type<double>(std::tr1::norm(d1));
+ check_ret_type<long double>(std::tr1::norm(ld1));
- check_ret_type<cmplx_f_type>(polar(f1, f1));
- check_ret_type<cmplx_d_type>(polar(d1, f1));
- check_ret_type<cmplx_d_type>(polar(f1, d1));
- check_ret_type<cmplx_d_type>(polar(d1, d1));
- check_ret_type<cmplx_ld_type>(polar(ld1, d1));
- check_ret_type<cmplx_ld_type>(polar(d1, ld1));
- check_ret_type<cmplx_ld_type>(polar(ld1, f1));
- check_ret_type<cmplx_ld_type>(polar(f1, ld1));
- check_ret_type<cmplx_ld_type>(polar(ld1, ld1));
+ check_ret_type<cmplx_f_type>(std::tr1::polar(f1, f1));
+ check_ret_type<cmplx_d_type>(std::tr1::polar(d1, f1));
+ check_ret_type<cmplx_d_type>(std::tr1::polar(f1, d1));
+ check_ret_type<cmplx_d_type>(std::tr1::polar(d1, d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::polar(ld1, d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::polar(d1, ld1));
+ check_ret_type<cmplx_ld_type>(std::tr1::polar(ld1, f1));
+ check_ret_type<cmplx_ld_type>(std::tr1::polar(f1, ld1));
+ check_ret_type<cmplx_ld_type>(std::tr1::polar(ld1, ld1));
- check_ret_type<cmplx_f_type>(pow(c_f1, f1));
- check_ret_type<cmplx_d_type>(pow(c_d1, f1));
- check_ret_type<cmplx_d_type>(pow(c_f1, d1));
- check_ret_type<cmplx_d_type>(pow(c_d1, d1));
- check_ret_type<cmplx_ld_type>(pow(c_ld1, d1));
- check_ret_type<cmplx_ld_type>(pow(c_d1, ld1));
- check_ret_type<cmplx_ld_type>(pow(c_ld1, f1));
- check_ret_type<cmplx_ld_type>(pow(c_f1, ld1));
- check_ret_type<cmplx_ld_type>(pow(c_ld1, ld1));
+ check_ret_type<cmplx_f_type>(std::tr1::pow(c_f1, f1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(c_d1, f1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(c_f1, d1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(c_d1, d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_ld1, d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_d1, ld1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_ld1, f1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_f1, ld1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_ld1, ld1));
- check_ret_type<cmplx_f_type>(pow(f1, c_f1));
- check_ret_type<cmplx_d_type>(pow(d1, c_f1));
- check_ret_type<cmplx_d_type>(pow(f1, c_d1));
- check_ret_type<cmplx_d_type>(pow(d1, c_d1));
- check_ret_type<cmplx_ld_type>(pow(ld1, c_d1));
- check_ret_type<cmplx_ld_type>(pow(d1, c_ld1));
- check_ret_type<cmplx_ld_type>(pow(ld1, c_f1));
- check_ret_type<cmplx_ld_type>(pow(f1, c_ld1));
- check_ret_type<cmplx_ld_type>(pow(ld1, c_ld1));
+ check_ret_type<cmplx_f_type>(std::tr1::pow(f1, c_f1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(d1, c_f1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(f1, c_d1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(d1, c_d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(ld1, c_d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(d1, c_ld1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(ld1, c_f1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(f1, c_ld1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(ld1, c_ld1));
- check_ret_type<cmplx_f_type>(pow(c_f1, c_f1));
- check_ret_type<cmplx_d_type>(pow(c_d1, c_f1));
- check_ret_type<cmplx_d_type>(pow(c_f1, c_d1));
- check_ret_type<cmplx_d_type>(pow(c_d1, c_d1));
- check_ret_type<cmplx_ld_type>(pow(c_ld1, c_d1));
- check_ret_type<cmplx_ld_type>(pow(c_d1, c_ld1));
- check_ret_type<cmplx_ld_type>(pow(c_ld1, c_f1));
- check_ret_type<cmplx_ld_type>(pow(c_f1, c_ld1));
- check_ret_type<cmplx_ld_type>(pow(c_ld1, c_ld1));
+ check_ret_type<cmplx_f_type>(std::tr1::pow(c_f1, c_f1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(c_d1, c_f1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(c_f1, c_d1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(c_d1, c_d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_ld1, c_d1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_d1, c_ld1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_ld1, c_f1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_f1, c_ld1));
+ check_ret_type<cmplx_ld_type>(std::tr1::pow(c_ld1, c_ld1));
- check_ret_type<float>(real(f1));
- check_ret_type<double>(real(d1));
- check_ret_type<long double>(real(ld1));
+ check_ret_type<float>(std::tr1::real(f1));
+ check_ret_type<double>(std::tr1::real(d1));
+ check_ret_type<long double>(std::tr1::real(ld1));
}
diff --git a/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_int.cc b/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_int.cc
index 07b2f92..b018351 100644
--- a/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_int.cc
+++ b/libstdc++-v3/testsuite/tr1/8_c_compatibility/complex/overloads_int.cc
@@ -27,8 +27,7 @@
void test01()
{
bool test __attribute__((unused)) = true;
- using namespace std::tr1;
- using namespace __gnu_test;
+ using __gnu_test::check_ret_type;
typedef std::complex<float> cmplx_f_type;
typedef std::complex<double> cmplx_d_type;
@@ -39,57 +38,63 @@ void test01()
const double f1 = 1.0f;
const double d1 = 1.0;
- check_ret_type<double>(arg(i1));
- VERIFY( arg(i1) == arg(double(i1)) );
- VERIFY( arg(i1) == arg(cmplx_d_type(double(i1))) );
+ check_ret_type<double>(std::tr1::arg(i1));
+ VERIFY( std::tr1::arg(i1) == std::tr1::arg(double(i1)) );
+ VERIFY( std::tr1::arg(i1) == std::tr1::arg(cmplx_d_type(double(i1))) );
- check_ret_type<cmplx_d_type>(conj(i1));
- VERIFY( conj(i1) == conj(double(i1)) );
- VERIFY( conj(i1) == conj(cmplx_d_type(double(i1))) );
+ check_ret_type<cmplx_d_type>(std::tr1::conj(i1));
+ VERIFY( std::tr1::conj(i1) == std::tr1::conj(double(i1)) );
+ VERIFY( std::tr1::conj(i1) == std::tr1::conj(cmplx_d_type(double(i1))) );
- check_ret_type<double>(imag(i1));
- VERIFY( imag(i1) == imag(double(i1)) );
- VERIFY( imag(i1) == imag(cmplx_d_type(double(i1))) );
+ check_ret_type<double>(std::tr1::imag(i1));
+ VERIFY( std::tr1::imag(i1) == std::tr1::imag(double(i1)) );
+ VERIFY( std::tr1::imag(i1) == std::tr1::imag(cmplx_d_type(double(i1))) );
- check_ret_type<double>(norm(i1));
- VERIFY( norm(i1) == norm(double(i1)) );
+ check_ret_type<double>(std::tr1::norm(i1));
+ VERIFY( std::tr1::norm(i1) == std::tr1::norm(double(i1)) );
// std::norm<const complex<>&) is mathematically equivalent to just
// this for a real, but the general algorithm goes through std::abs
// and a multiplication.
- VERIFY( norm(i1) == double(i1) * double(i1) );
+ VERIFY( std::tr1::norm(i1) == double(i1) * double(i1) );
+
+ // NB: The existing std::polar wins and a cmplx_i_type is returned.
+ // check_ret_type<cmplx_d_type>(std::tr1::polar(i1, i1));
+ // VERIFY( std::tr1::polar(i1, i1)
+ // == std::tr1::polar(double(i1), double(i1)) );
+ typedef std::complex<int> cmplx_i_type;
+ check_ret_type<cmplx_i_type>(std::tr1::polar(i1, i1));
- check_ret_type<cmplx_d_type>(polar(i1, i1));
- VERIFY( polar(i1, i1) == polar(double(i1), double(i1)) );
// NB: According to the letter of 8.1.9/3 the return type should be a
// cmplx_d_type, but the existing std::pow(const complex<>&, int) wins.
- check_ret_type<cmplx_f_type>(pow(cmplx_f_type(f1, f1), i1));
+ // check_ret_type<cmplx_d_type>(std::tr1::pow(cmplx_f_type(f1, f1), i1));
+ check_ret_type<cmplx_f_type>(std::tr1::pow(cmplx_f_type(f1, f1), i1));
- check_ret_type<cmplx_d_type>(pow(cmplx_f_type(f1, f1), u1));
- check_ret_type<cmplx_d_type>(pow(cmplx_f_type(f1, f1), l1));
- check_ret_type<cmplx_d_type>(pow(cmplx_d_type(d1, d1), i1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(cmplx_f_type(f1, f1), u1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(cmplx_f_type(f1, f1), l1));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(cmplx_d_type(d1, d1), i1));
// See last comment.
- // VERIFY( pow(cmplx_d_type(d1, d1), i1)
- // == pow(cmplx_d_type(d1, d1), double(i1)) );
- VERIFY( pow(cmplx_d_type(d1, d1), u1)
- == pow(cmplx_d_type(d1, d1), double(u1)) );
- VERIFY( pow(cmplx_d_type(d1, d1), l1)
- == pow(cmplx_d_type(d1, d1), double(l1)) );
+ // VERIFY( std::tr1::pow(cmplx_d_type(d1, d1), i1)
+ // == std::tr1::pow(cmplx_d_type(d1, d1), double(i1)) );
+ VERIFY( std::tr1::pow(cmplx_d_type(d1, d1), u1)
+ == std::tr1::pow(cmplx_d_type(d1, d1), double(u1)) );
+ VERIFY( std::tr1::pow(cmplx_d_type(d1, d1), l1)
+ == std::tr1::pow(cmplx_d_type(d1, d1), double(l1)) );
- check_ret_type<cmplx_d_type>(pow(i1, cmplx_f_type(f1, f1)));
- check_ret_type<cmplx_d_type>(pow(u1, cmplx_f_type(f1, f1)));
- check_ret_type<cmplx_d_type>(pow(l1, cmplx_f_type(f1, f1)));
- check_ret_type<cmplx_d_type>(pow(i1, cmplx_d_type(d1, d1)));
- VERIFY( pow(i1, cmplx_d_type(d1, d1))
- == pow(double(i1), cmplx_d_type(d1, d1)) );
- VERIFY( pow(u1, cmplx_d_type(d1, d1))
- == pow(double(u1), cmplx_d_type(d1, d1)) );
- VERIFY( pow(l1, cmplx_d_type(d1, d1))
- == pow(double(l1), cmplx_d_type(d1, d1)) );
+ check_ret_type<cmplx_d_type>(std::tr1::pow(i1, cmplx_f_type(f1, f1)));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(u1, cmplx_f_type(f1, f1)));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(l1, cmplx_f_type(f1, f1)));
+ check_ret_type<cmplx_d_type>(std::tr1::pow(i1, cmplx_d_type(d1, d1)));
+ VERIFY( std::tr1::pow(i1, cmplx_d_type(d1, d1))
+ == std::tr1::pow(double(i1), cmplx_d_type(d1, d1)) );
+ VERIFY( std::tr1::pow(u1, cmplx_d_type(d1, d1))
+ == std::tr1::pow(double(u1), cmplx_d_type(d1, d1)) );
+ VERIFY( std::tr1::pow(l1, cmplx_d_type(d1, d1))
+ == std::tr1::pow(double(l1), cmplx_d_type(d1, d1)) );
- check_ret_type<double>(real(i1));
- VERIFY( real(i1) == real(double(i1)) );
- VERIFY( real(i1) == real(cmplx_d_type(double(i1))) );
+ check_ret_type<double>(std::tr1::real(i1));
+ VERIFY( std::tr1::real(i1) == std::tr1::real(double(i1)) );
+ VERIFY( std::tr1::real(i1) == std::tr1::real(cmplx_d_type(double(i1))) );
}
int main()
diff --git a/libstdc++-v3/testsuite/tr1/headers.cc b/libstdc++-v3/testsuite/tr1/headers.cc
index ad77006..0650f53 100644
--- a/libstdc++-v3/testsuite/tr1/headers.cc
+++ b/libstdc++-v3/testsuite/tr1/headers.cc
@@ -33,6 +33,7 @@
#include <tr1/cstdint>
#include <tr1/cstdio>
#include <tr1/cstdlib>
+#include <tr1/ctgmath>
#include <tr1/ctime>
#include <tr1/ctype.h>
#include <tr1/cwchar>
@@ -49,6 +50,7 @@
#include <tr1/stdint.h>
#include <tr1/stdio.h>
#include <tr1/stdlib.h>
+#include <tr1/tgmath.h>
#include <tr1/tuple>
#include <tr1/type_traits>
#include <tr1/unordered_set>