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
857 B

25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. // I/O of lfloats.
  2. #ifndef _CL_LFLOAT_IO_H
  3. #define _CL_LFLOAT_IO_H
  4. #include "cln/number_io.h"
  5. #include "cln/lfloat.h"
  6. namespace cln {
  7. inline cl_istream operator>> (cl_istream stream, cl_LF& result)
  8. {
  9. extern cl_read_flags cl_LF_read_flags;
  10. extern const cl_F read_float (cl_istream, const cl_read_flags&);
  11. result = As(cl_LF)(read_float(stream,cl_LF_read_flags));
  12. return stream;
  13. }
  14. // The following does strictly the same as the general `fprint' for floats.
  15. // It is here only so that people don't need to include <cln/float_io.h>.
  16. inline void fprint (cl_ostream stream, const cl_LF& x)
  17. {
  18. extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z);
  19. extern cl_print_flags default_print_flags;
  20. print_float(stream,default_print_flags,x);
  21. }
  22. CL_DEFINE_PRINT_OPERATOR(cl_LF)
  23. } // namespace cln
  24. #endif /* _CL_LFLOAT_IO_H */