mirror of
https://github.com/nineties/planckforth
synced 2024-12-26 21:58:42 +01:00
Add comments to bitscan-forward
This commit is contained in:
parent
b67d488a58
commit
d07e23eb00
1 changed files with 3 additions and 1 deletions
|
@ -32,7 +32,9 @@ create bsf-modulo-131-table
|
|||
\ Find the index of the least significant 1 bit
|
||||
\ If u == 0, returns -1
|
||||
: bitscan-forward ( u -- u )
|
||||
dup negate and 131 mod cells bsf-modulo-131-table + @
|
||||
dup negate and \ LS1B isolation
|
||||
131 mod \ perfect hashing
|
||||
cells bsf-modulo-131-table + @
|
||||
; export
|
||||
|
||||
create msb-index-table
|
||||
|
|
Loading…
Reference in a new issue