4 #include "base/cl_sysdep.h"
7 #include "cln/integer.h"
12 #include "integer/cl_I.h"
13 #include "base/digitseq/cl_DS.h"
17 bool logbitp (uintC x, const cl_I& y)
20 // Falls x>=intDsize*Länge(y), teste Vorzeichen von y.
21 // Sonst x=intDsize*k+i, Teste Bit i vom Worte Nr. k+1 (von oben herab).
23 var const uintD* yMSDptr;
25 var const uintD* yLSDptr;
26 I_to_NDS_nocopy(y, yMSDptr=,ylen=,yLSDptr=,true, { return false; } ); // DS zu y
27 if (x < intDsize*ylen)
28 // x ist >=0, < intDsize*ylen
29 { if (lspref(yLSDptr,floor(x,intDsize)) & bit(x%intDsize))
34 // Vorzeichen von y testen
35 if (/* (ylen > 0) && */ ((sintD)mspref(yMSDptr,0) < 0))