User Tools

A PCRE internal error occured. This might be caused by a faulty plugin

====== Function LOGBITP ====== ====Syntax==== * **logbitp** //index integer// → //generalized-boolean// ====Arguments and Values==== * //index// - a non-negative //[[CL:Glossary:integer]]//. * //integer// - an //[[CL:Glossary:integer]]//. * //generalized-boolean// - a //[[CL:Glossary:generalized boolean]]//. ====Description==== **logbitp** is used to test the value of a particular bit in //integer//, that is treated as if it were binary. The value of **logbitp** is //[[CL:Glossary:true]]// if the bit in //integer// whose index is //index// (that is, its weight is ''2^index'') is a one-bit; otherwise it is //[[CL:Glossary:false]]//. Negative //integers// are treated as if they were in two's-complement notation. ====Examples==== <blockquote> (logbitp 1 1) <r>//[[CL:Glossary:false]]// </r> (logbitp 0 1) <r>//[[CL:Glossary:true]]// </r> (logbitp 3 10) <r>//[[CL:Glossary:true]]// </r> (logbitp 1000000 -1) <r>//[[CL:Glossary:true]]// </r> (logbitp 2 6) <r>//[[CL:Glossary:true]]// </r> (logbitp 0 6) <r>//[[CL:Glossary:false]]// </r> </blockquote> ====Side Effects==== None. ====Affected By==== None. ====Exceptional Situations==== Should signal an error of type type-error if //index// is not a non-negative //[[CL:Glossary:integer]]//. Should signal an error of type type-error if //integer// is not an //[[CL:Glossary:integer]]//. ====See Also==== None. ====Notes==== <blockquote> (logbitp //k// //n//) ≡ ([[CL:Functions:ldb-test]] ([[CL:Functions:byte]] 1 //k//) //n//) </blockquote> \issue{ARGUMENTS-UNDERSPECIFIED:SPECIFY}