Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
24
Task/Van-der-Corput-sequence/VBA/van-der-corput-sequence.vba
Normal file
24
Task/Van-der-Corput-sequence/VBA/van-der-corput-sequence.vba
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
Private Function vdc(ByVal n As Integer, BASE As Variant) As Variant
|
||||
Dim res As String
|
||||
Dim digit As Integer, g As Integer, denom As Integer
|
||||
denom = 1
|
||||
Do While n
|
||||
denom = denom * BASE
|
||||
digit = n Mod BASE
|
||||
n = n \ BASE
|
||||
res = res & CStr(digit) '+ "0"
|
||||
Loop
|
||||
vdc = IIf(Len(res) = 0, "0", "0." & res)
|
||||
End Function
|
||||
|
||||
Public Sub show_vdc()
|
||||
Dim v As Variant, j As Integer
|
||||
For i = 2 To 5
|
||||
Debug.Print "Base "; i; ": ";
|
||||
For j = 0 To 9
|
||||
v = vdc(j, i)
|
||||
Debug.Print v; " ";
|
||||
Next j
|
||||
Debug.Print
|
||||
Next i
|
||||
End Sub
|
||||
Loading…
Add table
Add a link
Reference in a new issue