added ++fil and ++swap

This commit is contained in:
johncburnham 2014-05-01 21:16:40 -07:00
parent a05b79a0d3
commit 465f22a918

View File

@ -821,6 +821,15 @@
|= [a=bloq b=@ c=@] |= [a=bloq b=@ c=@]
(mod c (bex (mul (bex a) b))) (mod c (bex (mul (bex a) b)))
:: ::
++ fil :: fill bloqstream
|= [a=bloq b=@ c=@]
=+ n=0
=+ d=c
|- ^- @
?: =(n b)
(rsh a 1 d)
$(d (add c (lsh a 1 d)), n +(n))
:::
++ lsh :: left-shift ++ lsh :: left-shift
~/ %lsh ~/ %lsh
|= [a=bloq b=@ c=@] |= [a=bloq b=@ c=@]
@ -866,6 +875,8 @@
~/ %rsh ~/ %rsh
|= [a=bloq b=@ c=@] |= [a=bloq b=@ c=@]
(div c (bex (mul (bex a) b))) (div c (bex (mul (bex a) b)))
++ swap |=([a=bloq b=@] (rep a (flop (rip a b)))) :: reverse bloq order
::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: section 2cB, bit logic :: :: section 2cB, bit logic ::
:: ::