You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
474 B

25 years ago
25 years ago
25 years ago
  1. // round1().
  2. // General includes.
  3. #include "cl_sysdep.h"
  4. // Specification.
  5. #include "cln/real.h"
  6. // Implementation.
  7. #include "cl_R.h"
  8. #include "cln/rational.h"
  9. namespace cln {
  10. const cl_I round1 (const cl_R& x, const cl_R& y)
  11. {
  12. // Methode:
  13. // Beides rationale Zahlen -> round1(x,y).
  14. // Sonst: round1(x/y).
  15. if (rationalp(x))
  16. if (rationalp(y)) {
  17. DeclareType(cl_RA,x);
  18. DeclareType(cl_RA,y);
  19. return round1(x,y);
  20. }
  21. return round1(x/y);
  22. }
  23. } // namespace cln