[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-patches
Subject:    Fwd: [PATCH, libstdc++, complex] complex multiplication algorithm improved
From:       Wang Feng <wanng.fenng () gmail ! com>
Date:       2010-09-16 8:45:52
Message-ID: AANLkTikx_26h0cMMHEa4mSxSCwBKSxBGvhQwY8E9nmAU () mail ! gmail ! com
[Download RAW message or body]

From: Wang Feng <wanng.fenng@gmail.com>
Date: 16 September 2010 16:38
Subject: Re: [PATCH, libstdc++, complex] complex multiplication
algorithm improved
To: Gabriel Dos Reis <gdr@integrable-solutions.net>


On 15 September 2010 21:39, Gabriel Dos Reis
<gdr@integrable-solutions.net> wrote:
> Hi,
> I would like to see more data to support the change.
> (I apologize if the mere mention of "numerical recipe"
> does not move me.)
> I am in no way claiming that the current implementation
> in all conceivable aspects.  However, I think we need to
> have "good" reasons to move the implementation one
> way or the other.   I also think we should be using
> builtin __complex__ T for standard integer type T.
>
I have to admit this will slow down our program while using
float/double/long double, but I guess situation might be better for
old-styled cpus.

BTW,  would you please take a look at Eq. 5.4.4 - 5.4.7 in
http://www.haoli.org/nr/bookcpdf/c5-4.pdf ?
I noticed abs is precision-optimized for all types, but this kind of
optimization leads abs(complex<int>(3,4)) to 4, not 5,
while division and square root functions are not optimized for
float/double/long double.

sorry for the noise.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic