]> www.ginac.de Git - cln.git/blob - include/cln/ffloat_io.h
Add support for x86_64 CPU.
[cln.git] / include / cln / ffloat_io.h
1 // I/O of ffloats.
2
3 #ifndef _CL_FFLOAT_IO_H
4 #define _CL_FFLOAT_IO_H
5
6 #include "cln/number_io.h"
7 #include "cln/ffloat.h"
8
9 namespace cln {
10
11 inline std::istream& operator>> (std::istream& stream, cl_FF& result)
12 {
13         extern cl_read_flags cl_FF_read_flags;
14         extern const cl_F read_float (std::istream&, const cl_read_flags&);
15         result = As(cl_FF)(read_float(stream,cl_FF_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_FF& 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_FF)
28
29 }  // namespace cln
30
31 #endif /* _CL_FFLOAT_IO_H */