]> www.ginac.de Git - cln.git/blob - src/real/division/cl_R_fround1.cc
* All Files have been modified for inclusion of namespace cln;
[cln.git] / src / real / division / cl_R_fround1.cc
1 // fround().
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 #include "cl_RA.h"
14 #include "cln/integer.h"
15 #include "cln/sfloat.h"
16 #include "cln/ffloat.h"
17 #include "cln/dfloat.h"
18 #include "cln/lfloat.h"
19
20 namespace cln {
21
22 const cl_F fround (const cl_R& x)
23 {
24         realcase6(x
25         ,       return cl_float(x);
26         ,       var const cl_I& a = numerator(x);
27                 var const cl_I& b = denominator(x);
28                 return cl_float(round1(a,b));
29         ,       return fround(x);
30         ,       return fround(x);
31         ,       return fround(x);
32         ,       return fround(x);
33         );
34 }
35
36 }  // namespace cln