]> www.ginac.de Git - cln.git/blob - include/cl_dfloat_io.h
Distinguish between cl_word_size and the ABI's pointer size.
[cln.git] / include / cl_dfloat_io.h
1 // I/O of dfloats.
2
3 #ifndef _CL_DFLOAT_IO_H
4 #define _CL_DFLOAT_IO_H
5
6 #include "cl_number_io.h"
7 #include "cl_dfloat.h"
8
9 inline cl_istream operator>> (cl_istream stream, cl_DF& result)
10 {
11         extern cl_read_flags cl_DF_read_flags;
12         extern const cl_F read_float (cl_istream, const cl_read_flags&);
13         result = As(cl_DF)(read_float(stream,cl_DF_read_flags));
14         return stream;
15 }
16
17 // The following does strictly the same as the general `fprint' for floats.
18 // It is here only so that people don't need to include <cl_float_io.h>.
19 inline void fprint (cl_ostream stream, const cl_DF& x)
20 {
21         extern void print_float (cl_ostream stream, const cl_print_flags& flags, const cl_F& z);
22         extern cl_print_flags cl_default_print_flags;
23         print_float(stream,cl_default_print_flags,x);
24 }
25 CL_DEFINE_PRINT_OPERATOR(cl_DF)
26
27 #endif /* _CL_DFLOAT_IO_H */