[PATCH, libstdc++, complex] complex multiplication algorithm improved

Paolo Carlini paolo.carlini@oracle.com
Wed Sep 15 08:40:00 GMT 2010


On 09/15/2010 10:24 AM, Wang Feng wrote:
> Hi,
>    Complex number multiplication done with 4 multiplications, but
> this one only need 3:
>
>             (a+ib)(c+id) = ac - bd + i( bc + ad ) -- 4 multiplies
>                                = ac - bd + i[ ( a + b )( c + d ) - ac
> - bd ] -- 3 multiplies
>   
Makes sense to me. Gaby, can you have a look?

Paolo.



More information about the Libstdc++ mailing list