Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:45:16

0001 //  (C) Copyright John Maddock 2005.
0002 //  Use, modification and distribution are subject to the
0003 //  Boost Software License, Version 1.0. (See accompanying file
0004 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0005 
0006 #ifndef BOOST_MATH_COMPLEX_FABS_INCLUDED
0007 #define BOOST_MATH_COMPLEX_FABS_INCLUDED
0008 
0009 #ifndef BOOST_MATH_HYPOT_INCLUDED
0010 #  include <boost/math/special_functions/hypot.hpp>
0011 #endif
0012 
0013 namespace boost{ namespace math{
0014 
0015 template<class T> 
0016 inline T fabs(const std::complex<T>& z)
0017 {
0018    return ::boost::math::hypot(z.real(), z.imag());
0019 }
0020 
0021 } } // namespaces
0022 
0023 #endif // BOOST_MATH_COMPLEX_FABS_INCLUDED