1 // print_float_binary().
7 #include "cl_float_io.h"
14 #include "cl_integer_io.h"
17 void print_float_binary (cl_ostream stream, const cl_F& z)
19 // Vorzeichen, Punkt, Mantisse (binär), (Zweiersystem-)Exponent (dezimal)
20 cl_idecoded_float m_e_s = integer_decode_float(z);
21 var cl_I& m = m_e_s.mantissa;
22 var cl_I& s = m_e_s.sign;
23 // Vorzeichen ausgeben, falls <0:
25 fprintchar(stream,'-');
26 // Mantisse binär(!) ausgeben:
27 fprintchar(stream,'.');
28 print_integer(stream,2,m);
29 // Exponent-Marker ausgeben:
38 fprintchar(stream,exp_marker);
40 // Exponenten dezimal ausgeben:
41 print_integer(stream,10,cl_I(float_exponent(z)));