public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Edward E Meyer <eem2314@origin.ca.boeing.com>
To: gcc-gnats@gcc.gnu.org
Subject: libstdc++/4622: incorrect implementation of complex operator/=
Date: Fri, 19 Oct 2001 13:56:00 -0000	[thread overview]
Message-ID: <200110192054.NAA64735@origin.ca.boeing.com> (raw)

>Number:         4622
>Category:       libstdc++
>Synopsis:       incorrect implementation of complex operator/=
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 19 13:56:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Edward E Meyer
>Release:        3.0.1
>Organization:
Boeing
>Environment:
System: IRIX64 origin 6.5 01101245 IP35


	
host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: ../gcc-3.0.1/configure --prefix=/acct/eem2314/local
>Description:
the implementation of the operator/= function for std template complex
is wrong - the sign is reversed on the imaginary part on line 240 of
libstdc++-v3/include/bits/std_complex.h
>How-To-Repeat:
	
>Fix:
--- std_complex.h	Fri Oct 19 20:04:32 2001
+++ std_complex.h.patch	Fri Oct 19 20:05:41 2001
@@ -237,7 +237,7 @@
     {
       const _Tp __r =  _M_real * __z.real() + _M_imag * __z.imag();
       const _Tp __n = norm(__z);
-      _M_imag = (_M_real * __z.imag() - _M_imag * __z.real()) / __n;
+      _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
       _M_real = __r / __n;
       return *this;
     }
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2001-10-19 13:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-19 13:56 Edward E Meyer [this message]
2001-10-25 23:15 bkoz
2001-10-31  0:36 bkoz
2001-11-04 11:26 bkoz
2001-11-04 13:29 bkoz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200110192054.NAA64735@origin.ca.boeing.com \
    --to=eem2314@origin.ca.boeing.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).