]> www.ginac.de Git - cln.git/blob - include/cln/dfloat_io.h
Rework of autoconfiscation infrastructure
[cln.git] / include / cln / dfloat_io.h
1 // I/O of dfloats.
2
3 #ifndef _CL_DFLOAT_IO_H
4 #define _CL_DFLOAT_IO_H
5
6 #include "cln/number_io.h"
7 #include "cln/dfloat.h"
8
9 namespace cln {
10
11 inline std::istream& operator>> (std::istream& stream, cl_DF& result)
12 {
13         extern cl_read_flags cl_DF_read_flags;
14         extern const cl_F read_float (std::istream&, const cl_read_flags&);
15         result = As(cl_DF)(read_float(stream,cl_DF_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 (std::ostream& stream, const cl_DF& x)
22 {
23         extern void print_float (std::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_DF)
28
29 }  // namespace cln
30
31 #endif /* _CL_DFLOAT_IO_H */