PageRenderTime 44ms CodeModel.GetById 23ms 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. // General includes.
  3. #include "base/cl_sysdep.h"
  4. // Specification.
  5. #include "cln/ffloat.h"
  6. // Implementation.
  7. #include "float/ffloat/cl_FF.h"
  8. namespace cln {
  9. const cl_FF_div_t floor2 (const cl_FF& x, const cl_FF& y)
  10. {
  11. // Methode:
  12. // (q,r) := floor(x/y). Liefere q und x-y*q = y*r.
  13. var cl_FF_div_t q_r = floor2(x/y);
  14. var cl_I& q = q_r.quotient;
  15. var cl_FF& r = q_r.remainder;
  16. return cl_FF_div_t(q,y*r);
  17. }
  18. } // namespace cln