Complex arithmetic improvements?

Torbjorn Granlund tege@matematik.su.se
Fri Aug 21 12:51:00 GMT 1998


  > 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



More information about the Gcc mailing list