diff --git a/include/boost/numeric/ublas/traits.hpp b/include/boost/numeric/ublas/traits.hpp index 7b01fecf..62828441 100644 --- a/include/boost/numeric/ublas/traits.hpp +++ b/include/boost/numeric/ublas/traits.hpp @@ -306,8 +306,10 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE real_type norm_1 (const_reference t) { - return type_traits::type_abs (self_type::real (t)) + - type_traits::type_abs (self_type::imag (t)); + return self_type::type_abs (t); + // original computation has been replaced because a complex number should behave like a scalar type + // return type_traits::type_abs (self_type::real (t)) + + // type_traits::type_abs (self_type::imag (t)); } static BOOST_UBLAS_INLINE @@ -317,8 +319,10 @@ namespace boost { namespace numeric { namespace ublas { static BOOST_UBLAS_INLINE real_type norm_inf (const_reference t) { - return (std::max) (type_traits::type_abs (self_type::real (t)), - type_traits::type_abs (self_type::imag (t))); + return self_type::type_abs (t); + // original computation has been replaced because a complex number should behave like a scalar type + // return (std::max) (type_traits::type_abs (self_type::real (t)), + // type_traits::type_abs (self_type::imag (t))); } static