From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18161 invoked by alias); 27 Feb 2008 10:45:25 -0000 Received: (qmail 17885 invoked by uid 48); 27 Feb 2008 10:44:42 -0000 Date: Wed, 27 Feb 2008 10:45:00 -0000 Subject: [Bug c++/35389] New: error in norm() of STL X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "ywei at qualcomm dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-02/txt/msg02818.txt.bz2 There is something wrong with the norm() in STL to get the norm2 of complex numbers. Suppose we have complex x(8,1), the norm of x should be 8*8 + 1*1 = 65, but norm(x) returns 64, which is incorrect. If we do complex x(8,1), there is no problem, norm(x) does return 65. The issue is not limited to version 4.2.1. It is observed in other versions as well. -- Summary: error in norm() of STL Product: gcc Version: 4.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ywei at qualcomm dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35389