1 // integer_decode_float().
7 #include "cln/dfloat.h"
18 const cl_idecoded_float integer_decode_float (const cl_DF& x)
23 #if (cl_word_size==64)
25 DF_decode(x, { return cl_idecoded_float(0, 0, 1); },
28 return cl_idecoded_float(
29 Q_to_I(mant), // Mantisse (>0, <2^53) als Bignum
30 L_to_FN(exp-(DF_mant_len+1)), // e-53 als Fixnum
31 (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen
36 DF_decode2(x, { return cl_idecoded_float(0, 0, 1); },
37 sign=,exp=,manthi=,mantlo=
39 return cl_idecoded_float(
40 L2_to_I(manthi,mantlo), // Mantisse (>0, <2^53) als Bignum
41 L_to_FN(exp-(DF_mant_len+1)), // e als Fixnum
42 (sign>=0 ? cl_I(1) : cl_I(-1)) // (-1)^s erzeugen