From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24106 invoked by alias); 10 May 2003 19:36:01 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 24088 invoked by uid 71); 10 May 2003 19:36:00 -0000 Date: Sat, 10 May 2003 19:36:00 -0000 Message-ID: <20030510193600.24085.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Dara Hazeghi Subject: Re: libstdc++/10689: pow(std::complex(0),1/3) returns (nan, nan) instead of 0. Reply-To: Dara Hazeghi X-SW-Source: 2003-05/txt/msg00983.txt.bz2 List-Id: The following reply was made to PR libstdc++/10689; it has been noted by GNATS. From: Dara Hazeghi To: gcc-gnats@gcc.gnu.org, Daniel.Levine@jhuapl.edu Cc: Subject: Re: libstdc++/10689: pow(std::complex(0),1/3) returns (nan, nan) instead of 0. Date: Sat, 10 May 2003 12:26:42 -0700 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- trail&database=gcc&pr=10689 Hello, I can confirm this problem with 3.3 branch and mainline (20030508). However, next time you send in a testcase, make sure it compilers first. Dara #include #include using namespace std; int main() { complex complexZero; complex cubeRootof0; complex zeroToThe1; cubeRootof0 = pow(complexZero, 1.0/3.0); cerr << cubeRootof0 << endl; // Should be 0.0; zeroToThe1 = pow(complexZero, 1.0); cerr << zeroToThe1 << endl; // Should be 0.0; zeroToThe1 = pow(complexZero, 1); cerr << zeroToThe1 << endl; // Is 0.0; }