Professional Documents
Culture Documents
James H. Eshuis 516 Ontario Street St. Catharines, Ontario L2N 4N3 jeshuis@vaxxine.com
I present an equation for the calculation of position when movement is an oscillation within a positive arithmetic progression. I define the equation and give four examples. write the equation in C++. For computer programmers, I
Oscillation Equation
For a positive arithmetic progression with within the progression, number of terms, and starting at term , we can oscillate,
or equivalent
The equation variables defined: : The ending term : The starting term : The number of terms moved. Starting toward the left (negative), or starting toward the right (positive) : The common difference : The number of terms in the progression : The first term in the progression : The last term in the progression
If If Example 2:
and and
then then
If If
and and
then then
If If
and and
then then 3
If If
and and
then then
: Absolute value 4
: The modulus (mod), gives the remainder of integer division // variables of integer type