gcc/libstdc++-v3/testsuite/26_numerics/complex/pow.cc
Paul Kienzle 52ddaf41bf re PR libstdc++/13450 (std::pow(std::complex<double>(-1.,0.),0.5) yields (NaN,0))
2004-03-10  Paul Kienzle  <pkienzle@nist.gov>
	    Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/13450
	* include/std/std_complex.h (pow(const complex&, const _Tp&),
	pow(const _Tp&, const complex&)): Use cmath pow only when safe.
	* testsuite/26_numerics/complex/13450.cc: New.

	* testsuite/26_numerics/cmath/overloads.C: Rename to overloads.cc.
	* testsuite/26_numerics/complex/pow.C: Rename to pow.cc and fix.

From-SVN: r79227
2004-03-10 09:16:12 +00:00

15 lines
203 B
C++

// PR libbstdc++/10689
// Origin: Daniel.Levine@jhuaph.edu
#include <complex>
#include <testsuite_hooks.h>
int main()
{
std::complex<double> z;
VERIFY( pow(z, 1.0/3.0) == 0.0 );
return 0;
}