1 // cl_I internals for logical operations
6 #include "cln/number.h"
7 #include "integer/cl_I.h"
8 #include "base/digitseq/cl_DS.h"
12 // Liefert die Anzahl Digits, die ein Integer als DS bräuchte.
13 // (Leicht aufgerundet.)
14 inline uintC I_to_DS_need (const cl_I& x)
17 return FN_maxlength; // das wird reichen
19 return TheBignum(x)->length;
22 // Integer to Digit sequence, n Digits
23 // I_to_DS_n(obj,n,ptr=);
24 // Integer obj zu einer Digit sequence MSDptr/n/LSDptr machen,
25 // die genau n Digits hat (sollte n >= Bedarf und >= FN_maxlength sein).
26 // Die neue Digit-sequence darf modifiziert werden.
27 // < ptr: MSDptr der neuen DS
28 // Dabei wird num_stack erniedrigt.
29 #define I_to_DS_n(obj,n,ptr_zuweisung) \
30 {var uintD* destptr; \
31 num_stack_alloc(n,,destptr=); \
32 ptr_zuweisung I_to_DS_n_aux(obj,n,destptr); \
34 extern uintD* I_to_DS_n_aux (const cl_I& obj, uintC n, uintD* destptr);
38 #endif /* _CL_I_LOG_H */