PageRenderTime 29ms CodeModel.GetById 24ms app.highlight 4ms RepoModel.GetById 0ms app.codeStats 0ms

/cln-1.3.2/src/float/ffloat/division/cl_FF_floor22.cc

#
C++ | 26 lines | 12 code | 8 blank | 6 comment | 0 complexity | efe38904ad96ded3293b7a8c17e3e2c1 MD5 | raw file
Possible License(s): GPL-2.0
 1// floor2().
 2
 3// General includes.
 4#include "base/cl_sysdep.h"
 5
 6// Specification.
 7#include "cln/ffloat.h"
 8
 9
10// Implementation.
11
12#include "float/ffloat/cl_FF.h"
13
14namespace cln {
15
16const cl_FF_div_t floor2 (const cl_FF& x, const cl_FF& y)
17{
18// Methode:
19// (q,r) := floor(x/y). Liefere q und x-y*q = y*r.
20	var cl_FF_div_t q_r = floor2(x/y);
21	var cl_I& q = q_r.quotient;
22	var cl_FF& r = q_r.remainder;
23	return cl_FF_div_t(q,y*r);
24}
25
26}  // namespace cln