Van der Corput sequence
constant VdC = map { :2("0." ~ .base(2).flip) }, ^Inf;
.say for VdC[^16];sub VdC($base = 2) {
map {
[+] $_ && .polymod($base xx *) Z/ [\*] $base xx *
}, ^Inf
}
.say for VdC[^10];Output:
0
0.5
0.25
0.75
0.125
0.625
0.375
0.875
0.0625
0.5625Output:
Last updated