Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
fcn to_seq(x){ //--> list of ints
|
||||
z:=(x.log2()/7);
|
||||
(0).pump(z+1,List,'wrap(j){
|
||||
x.shiftRight((z-j)*7).bitAnd(0x7f).bitOr((j!=z) and 0x80 or 0)
|
||||
});
|
||||
}
|
||||
|
||||
fcn from_seq(in){ in.reduce(fcn(p,n){ p.shiftLeft(7).bitOr(n.bitAnd(0x7f)) },0) }
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
ns:=T(0x7f, 0x4000, 0, 0x3ffffe, 0x1fffff, 0x200000, 0x3311a1234df31413);
|
||||
ms:=ns.apply(to_seq);
|
||||
ns.zipWith(fcn{"%8,x --> %s --> %,x".fmt(vm.arglist.xplode()).println()},
|
||||
ms.apply("apply","%,x".fmt),
|
||||
ms.apply(from_seq));
|
||||
Loading…
Add table
Add a link
Reference in a new issue