focus expression text field at startup -> version 1.2
[LeanCalc.git] / help / lowbit
1 NAME
2     lowbit - index of lowest nonzero bit in binary representation of integer
3
4 SYNOPSIS
5     lowbit(x)
6
7 TYPES
8     x           nonzero integer
9
10     return      integer
11
12 DESCRIPTION
13     If x is a nonzero integer, lowbit(x) returns the index of the
14     lowest nonzero bit in the binary representation of abs(x).  Equivalently,
15     lowbit(x) is the greatest integer for which x/2^n is an integer;
16     the binary representation of x then ends with n zero bits.
17
18 EXAMPLE
19     > print lowbit(2), lowbit(3), lowbit(4), lowbit(-15), lowbit(2^27)
20     1 0 2 0 27
21
22 LIMITS
23     none
24
25 LINK LIBRARY
26     long zlowbit(ZVALUE x);
27
28 SEE ALSO
29     highbit, digits
30