1 // I/O of real numbers.
6 #include "cln/number_io.h"
13 // The following does strictly the same as the general read_complex.
14 // It is here only so that you don't need the complex number reader
15 // in order to read an rational number. ("Treeshaking")
16 extern const cl_R read_real (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse);
17 extern const cl_R read_real (std::istream& stream, const cl_read_flags& flags);
19 inline std::istream& operator>> (std::istream& stream, cl_R& result)
21 extern cl_read_flags cl_R_read_flags;
22 result = read_real(stream,cl_R_read_flags);
29 // Gibt eine Zahl aus.
30 // print_real(stream,flags,z);
33 // > flags: Ausgabe-Parameter
34 extern void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z);
35 extern void print_real (std::ostream& stream, const cl_print_number_flags& flags, const cl_R& z);
36 extern void print_real (std::ostream& stream, const cl_print_real_flags& flags, const cl_R& z);
38 // The following does strictly the same as the general `fprint' for numbers.
39 // It is here only so that you don't need the complex number printer
40 // in order to print an integer. ("Treeshaking")
42 inline void fprint (std::ostream& stream, const cl_R& x)
44 extern cl_print_flags default_print_flags;
45 print_real(stream,default_print_flags,x);
48 CL_DEFINE_PRINT_OPERATOR(cl_R)
52 #endif /* _CL_REAL_IO_H */