FANDOM


Alpha Function Version 1

The Alpha Function has been defined using program code shown below. This version contains some errors and will be replaced by Version 2 ... Work in Progress.


Program Code Version 1

The following is VBA visual basic code and will run as a macro in Microsoft Excel. This function creates a string literal of a \(J_8\) Function equal to the Alpha function with any Real number input. The program does not attempt to evaluate the function and the run time is therefore very fast.

Option Explicit

Dim vReal As Double, vMax As Integer
Function Alpha(r As Double) As String

Dim i As Integer

Alpha = "J_8(" & J_8(r) & ","

i = vGet6(0)
Alpha = Alpha & i & "," & vGet6(i) & ")"
End Function
Function J_8(r As Double) As String

Dim i As Integer

vReal = Log(r) / Log(10)

i = Int(vReal)
vReal = vReal - i

J_8 = vGamma(i, -1)
End Function
Function vGetI(i As Integer, j As Integer) As Integer

vReal = vReal * (j - i + 1)
vGetI = Int(vReal)

vReal = vReal - vGetI
End Function
Function vGet(i As Integer, j As Integer) As Integer

If i = j Then vGet = i Else vGet = vGetI(i, j) + i
End Function
Function vGet6(i As Integer) As Integer

Dim k As Integer

vGet6 = 0
Do: k = vGetI(0, 5)
    vGet6 = vGet6 + IIf(k = 5, 4, k)
    Loop Until k < 5

vGet6 = vGet6 + i
End Function
Function vGamma(q As Integer, m As Integer) As String

Dim j As Integer, k As Integer

If q = -1 Then j = vGet6(0) Else j = q
vGamma = "<" & j & ","

If j = 0 Then
    vGamma = vGamma & vGet6(0) & ">"
    Exit Function
    End If
    
If j > 1 Then vGamma = vGamma & vLambda(j) & ","
    
If m = -1 Then
    k = vGet6(1)
    vGamma = vGamma & k & ","
Else
    k = m
    End If
If k = 1 Then vGamma = vGamma & vGamma(0, -1) Else vGamma = vGamma & vGamma(1, k - 1)

vGamma = vGamma & "," & vGamma(0, -1) & "," & vGamma(0, -1) & ">"
End Function
Function vLambda(lSize As Integer) As String

Dim k As Integer

vLambda = "<"
For k = 1 To lSize
    vLambda = vLambda & vGamma(0, lSize - k) & IIf(k < lSize, ",", "")
    Next k

vLambda = vLambda & ">"
End Function


How the Function Works

A description of how the code works will be provided here ... Work in Progress.

  • VBA Constants
  • VBA Data Structures
  • VBA Functions
    • Alpha Function
    • Work In Progress

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.