4 #include "base/cl_sysdep.h"
7 #include "cln/rational.h"
12 #include "rational/cl_RA.h"
13 #include "cln/integer.h"
17 const cl_I floor1 (const cl_RA& x, const cl_RA& y)
20 // x = a/b, y = c/d -> liefere (floor (* a d) (* b c)).
21 // x Integer -> dito mit b=1.
22 // y Integer -> dito mit d=1.
23 // x und y Integer -> bekannt.
31 var const cl_I& c = numerator(y);
32 var const cl_I& d = denominator(y);
37 var const cl_I& a = numerator(x);
38 var const cl_I& b = denominator(x);
44 var const cl_I& c = numerator(y);
45 var const cl_I& d = denominator(y);
46 return floor1(a*d,b*c);