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

25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
25 years ago
  1. // I/O of ffloats.
  2. #ifndef _CL_FFLOAT_IO_H
  3. #define _CL_FFLOAT_IO_H
  4. #include "cln/number_io.h"
  5. #include "cln/ffloat.h"
  6. namespace cln {
  7. inline std::istream& operator>> (std::istream& stream, cl_FF& result)
  8. {
  9. extern cl_read_flags cl_FF_read_flags;
  10. extern const cl_F read_float (std::istream&, const cl_read_flags&);
  11. result = As(cl_FF)(read_float(stream,cl_FF_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 (std::ostream& stream, const cl_FF& x)
  17. {
  18. extern void print_float (std::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_FF)
  23. } // namespace cln
  24. #endif /* _CL_FFLOAT_IO_H */