bdonelson
- 13
- 2
Ok, that does sound like a good idea. Thank you.
Maybe this is closer to what you asking for?
Here is the center of the algorithm.
Is this easier to follow?
Maybe this is closer to what you asking for?
Here is the center of the algorithm.
Code:
// FirstStep is set to a value based on the Current Multiple of 6 Managed in the Outer Loop ( 6, 12, 18, etc. )
// SecondStep is set to a value based on the Current Odd Number ( 3, 5, 7, 9, 11, 13, 15, etc )
While (Inside = True) // Inside Loop
{
List.AdvanceRecords(FirstStep); // Advance to the next Value based on FirstStep
If(Side = 0)
List.MCheck(); // Set the Non-Prime Flag for the Minus
Else
List.PCheck(); // Set the Non-Prime Flag for the Plus
List.AdvanceRecords(SecondStep) // Advance to the next Value based on SecondStep
If ( SideFlag = 1) // SideFlag Switches
SideFlag = 0;
Else
SideFlag = 1;
If(Side = 0)
List.MCheck(); // Set the Non-Prime Flag for the Minus
Else
List.PCheck(); // Set the Non-Prime Flag for the Plus
If ( SideFlag = 1) // SideFlag Switches
SideFlag = 0;
Else
SideFlag = 1;
If ( CurrentStep <= MaxMultiple ) // MaxMultiple = Maximum Prime Value / 6
CurrentStep = CurrentStep + FirstStep + SecondStep; // Tracking Which Prime is Used
Else
Inside = False;
} // Inside Loop
Is this easier to follow?