g++ 4.3.1 implements std::norm(x) as std::abs(x) squared for built-in floating point types. I believe this is taking the standard too literally. It says std::norm should return "magnitude of x squared" in the mathematical sense (i.e. a floating-point approximation thereof), which is not necessarily equivalent to "the result of std::abs(x) squared". I think the intent of std::norm was clearly to avoid doing a square root if the magnitude is to be squared immediatelly.
-- Summary: unnecessarily strict std::norm implementation Product: gcc Version: 4.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: highegg at gmail dot com GCC host triplet: x86_64-suse-linux GCC target triplet: x86_64-suse-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39340