]> www.ginac.de Git - cln.git/blob - src/real/conv/cl_F_from_R.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / real / conv / cl_F_from_R.cc
1 // cl_float().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cln/real.h"
8
9
10 // Implementation.
11
12 #include "cl_R.h"
13
14 #if 0
15
16 namespace cln {
17
18 const cl_F cl_float (const cl_R& x, const cl_F& y)
19 {
20         if (rationalp(x)) {
21                 DeclareType(cl_RA,x);
22                 return cl_float(x,y);
23         } else {
24                 DeclareType(cl_F,x);
25                 return cl_float(x,y);
26         }
27 }
28
29 }  // namespace cln
30
31 #else // less type dispatch overhead
32
33 #include "cl_F.h"
34 #include "cl_LF.h"
35
36 namespace cln {
37
38 const cl_F cl_float (const cl_R& x, const cl_F& y)
39 {
40         floattypecase(y
41         ,       return cl_R_to_SF(x);
42         ,       return cl_R_to_FF(x);
43         ,       return cl_R_to_DF(x);
44         ,       return cl_R_to_LF(x,TheLfloat(y)->len);
45         );
46 }
47
48 }  // namespace cln
49
50 #endif