]> www.ginac.de Git - cln.git/blob - src/complex/misc/cl_C_conjugate.cc
Use paths relative the `src' directory in the #include directives.
[cln.git] / src / complex / misc / cl_C_conjugate.cc
1 // conjugate().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "cln/complex.h"
8
9
10 // Implementation.
11
12 #include "complex/cl_C.h"
13 #include "cln/real.h"
14
15 namespace cln {
16
17 const cl_N conjugate (const cl_N& x)
18 {
19         if (realp(x))
20                 return x;
21         else {
22                 DeclareType(cl_C,x);
23                 var const cl_R& a = realpart(x);
24                 var const cl_R& b = imagpart(x);
25                 // Vorzeichenwechsel beim Imaginärteil
26                 return complex_C(a,-b);
27         }
28 }
29
30 }  // namespace cln