builtins.c (fold_builtin_cabs): Fold cabs(x+xi) into fabs(x)*sqrt(2).
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Sat, 3 Feb 2007 16:13:23 +0000 (16:13 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Sat, 3 Feb 2007 16:13:23 +0000 (16:13 +0000)
commitd1ad84c20452e63a38a6b414a6eb7001711c520a
tree6f5c23e0e626e6b83e80b93c1170d1bf55370b71
parent36f7dcae093c3ed596010a4bf88ce731a7d6236e
builtins.c (fold_builtin_cabs): Fold cabs(x+xi) into fabs(x)*sqrt(2).

* builtins.c (fold_builtin_cabs): Fold cabs(x+xi) into
fabs(x)*sqrt(2).
* fold-const.c (fold_binary): Fix comment typos.  Fold complex
(x,0)-(0,y) into (x,-y).  Likewise (0,y)-(x,0) into (-x,y).

testsuite:
* gcc.dg/builtins-54.c: Add more cases.

From-SVN: r121542
gcc/ChangeLog
gcc/builtins.c
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtins-54.c