]> www.ginac.de Git - cln.git/blob - src/float/lfloat/division/cl_LF_floor22.cc
10f77d2db5a85938481a9b42179516f9e6e7a3ac
[cln.git] / src / float / lfloat / division / cl_LF_floor22.cc
1 // floor2().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cl_lfloat.h"
8
9
10 // Implementation.
11
12 #include "cl_LF.h"
13
14 const cl_LF_div_t floor2 (const cl_LF& x, const cl_LF& y)
15 {
16 // Methode:
17 // (q,r) := floor(x/y). Liefere q und x-y*q = y*r.
18         var cl_LF_div_t q_r = floor2(x/y);
19         var cl_I& q = q_r.quotient;
20         var cl_LF& r = q_r.remainder;
21         return cl_LF_div_t(q,y*r);
22 }