]> www.ginac.de Git - cln.git/blob - cl_C_from_R_R_complex1.cc
c4ebe9909ca89bf53b6522f396f99d5aedd2bb5c
[cln.git] / cl_C_from_R_R_complex1.cc
1 // complex().
2
3 // General includes.
4 #include "base/cl_sysdep.h"
5
6 // Specification.
7 #include "complex/cl_C.h"
8
9
10 // Implementation.
11
12 #include "real/cl_R.h"
13
14 namespace cln {
15
16 const cl_N complex (const cl_R& a, const cl_R& b)
17 {
18 // Methode:
19 // Falls b=0, nur a. sonst komplexe Zahl erzeugen.
20         if (eq(b,0))
21                 return a;
22         else
23                 return allocate_complex(a,b);
24 }
25
26 }  // namespace cln