This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Complex arithmetic improvements?
- To: egcs at cygnus dot com
- Subject: Re: Complex arithmetic improvements?
- From: Torbjorn Granlund <tege at matematik dot su dot se>
- Date: Fri, 21 Aug 1998 20:28:19 +0200
> Line 1266: /* (a+ib) * (c+id) = (ac-bd) + i(ad+cb) */
>
> this can be improved to
>
> = (ac - bd) + i[ (a+b)(c+d) - ac - bd ]
Don't do this.
1) It is numerically instable.
2) It does not save any time on modern CPUs.
Torbjörn