PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/cln-1.3.2/src/real/division/cl_R_ffloor1.cc

#
C++ | 36 lines | 24 code | 8 blank | 4 comment | 0 complexity | 0dfda52e349453a15ae8d58fc839d2a2 MD5 | raw file
Possible License(s): GPL-2.0
  1. // ffloor().
  2. // General includes.
  3. #include "base/cl_sysdep.h"
  4. // Specification.
  5. #include "cln/real.h"
  6. // Implementation.
  7. #include "real/cl_R.h"
  8. #include "rational/cl_RA.h"
  9. #include "cln/integer.h"
  10. #include "cln/sfloat.h"
  11. #include "cln/ffloat.h"
  12. #include "cln/dfloat.h"
  13. #include "cln/lfloat.h"
  14. namespace cln {
  15. const cl_F ffloor (const cl_R& x)
  16. {
  17. realcase6(x
  18. , return cl_float(x);
  19. , var const cl_I& a = numerator(x);
  20. var const cl_I& b = denominator(x);
  21. return cl_float(floor1(a,b));
  22. , return ffloor(x);
  23. , return ffloor(x);
  24. , return ffloor(x);
  25. , return ffloor(x);
  26. );
  27. }
  28. } // namespace cln