7 #include "cl_integer.h"
15 #include "cl_integer_io.h"
18 cl_boolean logbitp (const cl_I& x, const cl_I& y)
22 // Falls x>=0: Falls x>=intDsize*Länge(y), teste Vorzeichen von y.
23 // Sonst x=intDsize*k+i, Teste Bit i vom Worte Nr. k+1 (von oben herab).
24 if (!minusp(x)) // x>=0 ?
26 { var uintL x_ = FN_to_L(x);
28 var const uintD* yLSDptr;
29 I_to_NDS_nocopy(y, ,ylen=,yLSDptr=,cl_true, { return cl_false; } ); // DS zu y
30 if (x_ < intDsize*(uintL)ylen)
31 // x ist ein Fixnum >=0, < intDsize*ylen
32 { if (lspref(yLSDptr,floor(x_,intDsize)) & bit(x_%intDsize))
37 // Vorzeichen von y testen
45 { fprint(cl_stderr, "logbitp: Index is negative: ");
47 fprint(cl_stderr, "\n");