1 // integer_decode_float().
4 #include "base/cl_sysdep.h"
7 #include "cln/dfloat.h"
12 #include "float/dfloat/cl_DF.h"
13 #include "integer/cl_I.h"
17 CL_INLINE const cl_idecoded_float CL_INLINE_DECL(integer_decode_float) (const cl_DF& x)
22 #if (cl_word_size==64)
24 DF_decode(x, { return cl_idecoded_float(0, 0, 1); },
27 return cl_idecoded_float(
28 Q_to_I(mant), // Mantisse (>0, <2^53) als Bignum
29 L_to_FN(exp-(DF_mant_len+1)), // e-53 als Fixnum
30 (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen
35 DF_decode2(x, { return cl_idecoded_float(0, 0, 1); },
36 sign=,exp=,manthi=,mantlo=
38 return cl_idecoded_float(
39 L2_to_I(manthi,mantlo), // Mantisse (>0, <2^53) als Bignum
40 L_to_FN(exp-(DF_mant_len+1)), // e als Fixnum
41 (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen