Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add lsb and msb methods to Int
  • Loading branch information
TimToady committed May 29, 2013
1 parent 346540c commit 4f0895b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions S32-setting-library/Numeric.pod
Expand Up @@ -19,8 +19,8 @@ DRAFT: Synopsis 32: Setting Library - Numeric

Created: 19 Mar 2009 extracted from S29-functions.pod

Last Modified: 20 Sept 2012
Version: 16
Last Modified: 29 Sept 2013
Version: 17

The document is a draft.

Expand Down Expand Up @@ -492,6 +492,18 @@ if such is necessary.)

Returns False if C<$x> is known not to be a prime.

=item lsb

multi method lsb ( Int $x: ) is export

Returns the least significant bit position, where 0 is where the 1 bit is, 1 is where the 2 bit is, and so on.

=item msb

multi method msb ( Int $x: ) is export

Returns the most significant bit position, that is, the base 2 log of the top bit.

=back

=head2 Rat
Expand Down

0 comments on commit 4f0895b

Please sign in to comment.