]> www.ginac.de Git - cln.git/blob - src/complex/algebraic/cl_C_abs_aux.cc
* src/complex/transcendental/cl_C_expt_C.cc (expt): fix logic for
[cln.git] / src / complex / algebraic / cl_C_abs_aux.cc
1 // abs().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cl_C.h"
8
9
10 // Implementation.
11
12 #include "cln/real.h"
13
14 namespace cln {
15
16 MAYBE_INLINE
17 const cl_R abs (const cl_C& x)
18 {
19         var const cl_R& a = realpart(x);
20         var const cl_R& b = imagpart(x);
21         return cl_hypot(a,b);
22 }
23
24 }  // namespace cln