From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23293 invoked by alias); 3 May 2010 18:41:23 -0000 Received: (qmail 23282 invoked by uid 22791); 3 May 2010 18:41:22 -0000 X-SWARE-Spam-Status: No, hits=1.6 required=5.0 tests=BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SARE_MSGID_LONG45,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-iw0-f180.google.com (HELO mail-iw0-f180.google.com) (209.85.223.180) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 May 2010 18:41:16 +0000 Received: by iwn10 with SMTP id 10so3701711iwn.13 for ; Mon, 03 May 2010 11:41:14 -0700 (PDT) Received: by 10.231.150.195 with SMTP id z3mr419601ibv.3.1272912074493; Mon, 03 May 2010 11:41:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.231.32.199 with HTTP; Mon, 3 May 2010 11:40:46 -0700 (PDT) From: Rhys Ulerich Date: Mon, 03 May 2010 18:41:00 -0000 Message-ID: Subject: gsl_complex_pow_real(gsl_complex_rect(0,0),0) returns (0,0) To: gsl-discuss@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gsl-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gsl-discuss-owner@sourceware.org X-SW-Source: 2010-q2/txt/msg00004.txt.bz2 Hi all, Using gsl_complex_pow_real to compute (0+0i)^0 incorrectly gives 0 as the result. Try running #include #include #include int main(int argc, char *argv[]) { gsl_complex z = gsl_complex_pow_real(gsl_complex_rect(0,0), 0); printf("(%g,%g)\n", GSL_REAL(z), GSL_IMAG(z)); } which will output (0,0). I expect it to kick back (1,0). The behavior for (1+0i)^0 and (0+1i)^0 looks correct. Observed on GSL 1.14 with Intel 10.1 20090817 on Ubuntu 9.10 32bit. Also on GSL 1.13 with Intel 10.1 20081024 on Ubuntu 8.04 64bit. Also on GSL 1.12 with GCC 4.3.3 on Ubuntu 8.04 64bit. I've not seen any references to this on the mailing list or in savannah. Let me know if you'd like me to file a bug. - Rhys