failed attempts to intercept copy command when the cursor is in the empty text field...
[LeanCalc.git] / help / highbit
1 NAME
2     highbit - index of highest bit in binary representation of integer
3
4 SYNOPSIS
5     highbit(x)
6
7 TYPES
8     x           nonzero integer
9
10     return      integer
11
12 DESCRIPTION
13     If x is a nonzero integer, highbit(x) returns the index of the
14     highest bit in the binary representation of abs(x).  Equivalently,
15     highbit(x) = n if 2^n <= abs(x) < 2^(n + 1);  the binary
16     representation of x then has n + 1 digits.
17
18 EXAMPLE
19     > print highbit(2), highbit(3), highbit(4), highbit(-15), highbit(2^27)
20     1 1 2 3 27
21
22 LIMITS
23     none
24
25 LINK LIBRARY
26     LEN zhighbit(ZVALUE x);
27
28 SEE ALSO
29     lowbit, digits
30