Anda di halaman 1dari 4

Clock Equation for a Real Number Line Cycle

June 28, 2011

James H. Eshuis 516 Ontario Street St. Catharines, Ontario L2N 4N3 jeshuis@vaxxine.com

I present an equation for the calculation of position when moving forward or backward through a Real Number line cycle. I define the equation and give three examples. For computer programmers, I write the equation in C++.

Clock Equation
For a segment of the Real Number line with minimum value value , we can cycle a Real Number value , and max value , and starting

, forward or backward through the Real Number line

segment, ..., , ,..., , ,..., and determine our ending Real Number value =( +( )+( ) ,..., , ,..., , ,...

,using the equation ( )) ( )+

: Ending Real Number value on the segment of the Real Number line. : Starting Real Number value on the segment of the Real Number line. : Real Number value moved to the left (negative), or right (positive)

: Minimum Real Number value on the Real Number line. : Maximum Real Number value on the Real Number line. : The Real number remainder of a division operation. It is the result of subtracting the integral quotient multiplied by the denominator from the numerator.

Examples of the Clock Equation


Example 1: For the segment of the Real Number line with equation is =( If If = 45.00 and = 45.00 = 1236.50 then + 360.00 + = 201.50 = 248.50 360.00) 360.00 value of 0.00 and value of 360.00, the clock

= -1236.50 then

Example 2: For the segment of the Real Number line with equation is =( If If = 0.00 and = 0.00 = 655.75 then + 250.00 + = 55.75 = 144.25 250.00) 250.00 - 50.00 value of -50.00 and value of 150.00, the clock

= -655.75 then

Example 3: For the segment of the Real Number line with equation is =( If If = 0.00 and = 0.00 = 173.50 then + 45.25 + = -16.50 = -23.50 20.00) 20.00 - 25.25 value of -25.25 and value of -5.25, the clock

= -173.50 then

The Clock Equation in C++


= (( +( )+ ( , )),( )) + ;

: The Real number remainder of a division operation. It is the result of subtracting the integral quotient multiplied by the denominator from the numerator. the value returned is of type double, float, or long double. double float (double numerator, double denominator); (float numerator, float denominator);

long double Example 1:

(long double numerator, long double denominator);

For the segment of the Real Number line with clock equation is = Example 2: For the segment of the Real Number line with equation is = Example 3: For the segment of the Real Number line with equation is = (( + + ( , )), (( + 250.00 + ( , (( + + ( ,

value of 0.00 and

value of 360.00, the

)),

);

value of -50.00 and

value of 150.00, the clock

)),

) - 50.00;

value of -25.25 and

value of -5.25, the clock

) - 25.25;

Anda mungkin juga menyukai