mirror of
https://github.com/lcn2/calc.git
synced 2025-08-16 01:03:29 +03:00
Release calc version 2.10.2t30
This commit is contained in:
29
help/lowbit
Normal file
29
help/lowbit
Normal file
@@ -0,0 +1,29 @@
|
||||
NAME
|
||||
lowbit - index of lowest nonzero bit in binary representation of integer
|
||||
|
||||
SYNOPSIS
|
||||
lowbit(x)
|
||||
|
||||
TYPES
|
||||
x nonzero integer
|
||||
|
||||
return integer
|
||||
|
||||
DESCRIPTION
|
||||
If x is a nonzero integer, lowbit(x) returns the index of the
|
||||
lowest nonzero bit in the binary representation of abs(x). Equivalently,
|
||||
lowbit(x) is the greatest integer for which x/2^n is an integer;
|
||||
the binary representation of x then ends with n zero bits.
|
||||
|
||||
EXAMPLE
|
||||
> print lowbit(2), lowbit(3), lowbit(4), lowbit(-15), lowbit(2^27)
|
||||
1 0 2 0 27
|
||||
|
||||
LIMITS
|
||||
none
|
||||
|
||||
LIBRARY
|
||||
long zlowbit(ZVALUE x);
|
||||
|
||||
SEE ALSO
|
||||
highbit, digits
|
Reference in New Issue
Block a user