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.

47 lines
915 B

25 years ago
  1. // binary operator /
  2. // General includes.
  3. #include "cl_sysdep.h"
  4. // Specification.
  5. #include "cl_float.h"
  6. // Implementation.
  7. #include "cl_RA.h"
  8. #include "cl_sfloat.h"
  9. #include "cl_ffloat.h"
  10. #include "cl_dfloat.h"
  11. #include "cl_lfloat.h"
  12. #include "cl_F.h"
  13. #include "cl_SF.h"
  14. #include "cl_FF.h"
  15. #include "cl_DF.h"
  16. #include "cl_LF.h"
  17. const cl_F operator/ (const cl_F& x, const cl_RA& y)
  18. {
  19. floatcase(x
  20. , /* SF */ if (integerp(y)) {
  21. DeclareType(cl_I,y);
  22. return x / cl_I_to_SF(y);
  23. } else
  24. return x / cl_RA_to_SF(y);
  25. , /* FF */ if (integerp(y)) {
  26. DeclareType(cl_I,y);
  27. return x / cl_I_to_FF(y);
  28. } else
  29. return x / cl_RA_to_FF(y);
  30. , /* DF */ if (integerp(y)) {
  31. DeclareType(cl_I,y);
  32. return x / cl_I_to_DF(y);
  33. } else
  34. return x / cl_RA_to_DF(y);
  35. , /* LF */ if (integerp(y)) {
  36. DeclareType(cl_I,y);
  37. return cl_LF_I_div(x,y);
  38. } else
  39. return cl_LF_RA_div(x,y);
  40. );
  41. }