X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;ds=sidebyside;f=src%2Finteger%2Fbitwise%2Fcl_I_logbitp.cc;h=2c0884682a449c4886d9b7b1ab559e817082065b;hb=740c032627dfc7ac87d90d6e75b5e87e78c9e716;hp=8227b2e773bdd7d45c7ececd0c7c04f895eebf15;hpb=c84c6db5d56829d69083c819688a973867694a2a;p=cln.git diff --git a/src/integer/bitwise/cl_I_logbitp.cc b/src/integer/bitwise/cl_I_logbitp.cc index 8227b2e..2c08846 100644 --- a/src/integer/bitwise/cl_I_logbitp.cc +++ b/src/integer/bitwise/cl_I_logbitp.cc @@ -1,7 +1,7 @@ // logbitp(). // General includes. -#include "cl_sysdep.h" +#include "base/cl_sysdep.h" // Specification. #include "cln/integer.h" @@ -9,33 +9,33 @@ // Implementation. -#include "cl_I.h" -#include "cl_DS.h" +#include "integer/cl_I.h" +#include "base/digitseq/cl_DS.h" namespace cln { -cl_boolean logbitp (uintC x, const cl_I& y) +bool logbitp (uintC x, const cl_I& y) { // Methode: - // Falls x>=intDsize*Länge(y), teste Vorzeichen von y. + // Falls x>=intDsize*Länge(y), teste Vorzeichen von y. // Sonst x=intDsize*k+i, Teste Bit i vom Worte Nr. k+1 (von oben herab). var const uintD* yMSDptr; var uintC ylen; var const uintD* yLSDptr; - I_to_NDS_nocopy(y, yMSDptr=,ylen=,yLSDptr=,cl_true, { return cl_false; } ); // DS zu y + I_to_NDS_nocopy(y, yMSDptr=,ylen=,yLSDptr=,true, { return false; } ); // DS zu y if (x < intDsize*ylen) // x ist >=0, < intDsize*ylen { if (lspref(yLSDptr,floor(x,intDsize)) & bit(x%intDsize)) - return cl_true; + return true; else - return cl_false; + return false; } // Vorzeichen von y testen if (/* (ylen > 0) && */ ((sintD)mspref(yMSDptr,0) < 0)) - return cl_true; + return true; else - return cl_false; + return false; } } // namespace cln