]> www.ginac.de Git - cln.git/blob - include/cln/sfloat_io.h
* All Files have been modified for inclusion of namespace cln;
[cln.git] / include / cln / sfloat_io.h
1 // I/O of sfloats.
2
3 #ifndef _CL_SFLOAT_IO_H
4 #define _CL_SFLOAT_IO_H
5
6 #include "cln/number_io.h"
7 #include "cln/sfloat.h"
8
9 namespace cln {
10
11 inline cl_istream operator>> (cl_istream stream, cl_SF& result)
12 {
13         extern cl_read_flags cl_SF_read_flags;
14         extern const cl_F read_float (cl_istream, const cl_read_flags&);
15         result = As(cl_SF)(read_float(stream,cl_SF_read_flags));
16         return stream;
17 }
18
19 // The following does strictly the same as the general `fprint' for floats.
20 // It is here only so that people don't need to include <cln/float_io.h>.
21 inline void fprint (cl_ostream stream, const cl_SF& x)
22 {
23         extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z);
24         extern cl_print_flags default_print_flags;
25         print_float(stream,default_print_flags,x);
26 }
27 CL_DEFINE_PRINT_OPERATOR(cl_SF)
28
29 }  // namespace cln
30
31 #endif /* _CL_SFLOAT_IO_H */