Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
Halton:=proc(n,b)
|
||||
local i:=n,k:=1,s:=0,r;
|
||||
while i>0 do
|
||||
k/=b;
|
||||
i:=iquo(i,b,'r');
|
||||
s+=k*r
|
||||
od;
|
||||
s
|
||||
end;
|
||||
|
||||
map(Halton,[$1..10],2);
|
||||
# [1/2, 1/4, 3/4, 1/8, 5/8, 3/8, 7/8, 1/16, 9/16, 5/16]
|
||||
|
||||
map(Halton,[$1..10],3);
|
||||
# [1/3, 2/3, 1/9, 4/9, 7/9, 2/9, 5/9, 8/9, 1/27, 10/27]
|
||||
|
||||
map(Halton,[$1..10],4);
|
||||
# [1/4, 1/2, 3/4, 1/16, 5/16, 9/16, 13/16, 1/8, 3/8, 5/8]
|
||||
|
||||
map(Halton,[$1..10],5);
|
||||
[1/5, 2/5, 3/5, 4/5, 1/25, 6/25, 11/25, 16/25, 21/25, 2/25]
|
||||
Loading…
Add table
Add a link
Reference in a new issue