]> www.ginac.de Git - cln.git/blobdiff - src/integer/bitwise/cl_I_logbitp.cc
* */*: Convert encoding from ISO 8859-1 to UTF-8.
[cln.git] / src / integer / bitwise / cl_I_logbitp.cc
index 5eedaa5d073cd15c4c425428caf6b386e4e35cb8..6bfd4f7a4d4fef9c71356c4fe56576ebf09d2f3b 100644 (file)
 
 namespace cln {
 
-cl_boolean logbitp (uintL 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
-       if (x < intDsize*(uintL)ylen)
+       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