This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Bug in complex::norm


nbecker@fred.net writes:

| I just updated to gcc-3.0.1 and found a problem with the
| implementation of complex::norm.
| 
| It seems that norm is now defined in terms of abs!

I don't recall what was the previous definition.  Why do you think it
is now wrong?  (Just a question, since I'm far from home and I don't
have an autorithative reference).  For float, double, and long double
(which are the types for which complex<T> is specified), that is
right.  No?

| This is not
| efficient and is wrong for non-float types.

Is complex<T> required to work with non-floating point types T?

-- Gaby
CodeSourcery, LLC                       http://www.codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]