File indexing completed on 2026-05-19 08:08:30
0001
0002
0003 #ifndef _CL_FLOAT_IO_H
0004 #define _CL_FLOAT_IO_H
0005
0006 #include "cln/number_io.h"
0007 #include "cln/float.h"
0008
0009 namespace cln {
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 extern const cl_F read_float (unsigned int base, float_format_t prec,
0029 cl_signean sign, const char * string, uintC index1, uintC index4, uintC index2, uintC index3);
0030
0031
0032
0033
0034 extern const cl_F read_float (const cl_read_flags& flags, const char * string, const char * string_limit, const char * * end_of_parse);
0035 extern const cl_F read_float (std::istream& stream, const cl_read_flags& flags);
0036
0037 inline std::istream& operator>> (std::istream& stream, cl_F& result)
0038 {
0039 extern cl_read_flags cl_F_read_flags;
0040 result = read_float(stream,cl_F_read_flags);
0041 return stream;
0042 }
0043
0044
0045
0046
0047
0048
0049
0050
0051 extern void print_float (std::ostream& stream, const cl_print_flags& flags, const cl_F& z);
0052 extern void print_float (std::ostream& stream, const cl_print_number_flags& flags, const cl_F& z);
0053 extern void print_float (std::ostream& stream, const cl_print_real_flags& flags, const cl_F& z);
0054 extern void print_float (std::ostream& stream, const cl_print_float_flags& flags, const cl_F& z);
0055
0056
0057
0058
0059
0060 extern void print_float_binary (std::ostream& stream, const cl_F& z);
0061
0062
0063
0064
0065
0066 inline void fprint (std::ostream& stream, const cl_F& x)
0067 {
0068 extern cl_print_flags default_print_flags;
0069 print_float(stream,default_print_flags,x);
0070 }
0071
0072 CL_DEFINE_PRINT_OPERATOR(cl_F)
0073
0074 }
0075
0076 #endif