1 // I/O of real numbers.
6 #include "cln/number_io.h"
11 // Undocumented input functions
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 // Documented input functions
21 inline std::istream& operator>> (std::istream& stream, cl_R& result)
23 extern cl_read_flags cl_R_read_flags;
24 result = read_real(stream,cl_R_read_flags);
29 // Undocumented output functions
32 // Documented output functions
34 // Gibt eine Zahl aus.
35 // print_real(stream,flags,z);
38 // > flags: Ausgabe-Parameter
39 extern void print_real (std::ostream& stream, const cl_print_flags& flags, const cl_R& z);
40 extern void print_real (std::ostream& stream, const cl_print_number_flags& flags, const cl_R& z);
41 extern void print_real (std::ostream& stream, const cl_print_real_flags& flags, const cl_R& z);
43 // The following does strictly the same as the general `fprint' for numbers.
44 // It is here only so that you don't need the complex number printer
45 // in order to print an integer. ("Treeshaking")
47 inline void fprint (std::ostream& stream, const cl_R& x)
49 extern cl_print_flags default_print_flags;
50 print_real(stream,default_print_flags,x);
53 CL_DEFINE_PRINT_OPERATOR(cl_R)
57 #endif /* _CL_REAL_IO_H */