12 #include "cl_integer.h"
15 const cl_I cl_DF_to_I (const cl_DF& x)
18 // Falls x=0.0, Ergebnis 0.
19 // Sonst (ASH Vorzeichen*Mantisse (e-53)).
20 #if (cl_word_size==64)
25 DF_decode(x, { return 0; }, sign=,exp=,mant=);
26 exp = exp-(DF_mant_len+1);
27 // mant mit Vorzeichen versehen:
28 if (!(sign==0)) { mant = -mant; }
29 // in ein Bignum umwandeln und shiften:
30 return ash( Q_to_I(mant), exp );
37 DF_decode2(x, { return 0; }, sign=,exp=,manthi=,mantlo=);
38 exp = exp-(DF_mant_len+1);
39 // mant mit Vorzeichen versehen:
41 { manthi = -manthi; mantlo = -mantlo; if (!(mantlo==0)) { manthi -= 1; } }
42 // in ein Bignum umwandeln und shiften:
43 return ash( L2_to_I(manthi,mantlo), exp );