Multiple Calculation Software, with a Semi-Random Number Generator Based on Time          
Created by David Alderoty © 2012, E‑mail David@TechForText.com
  This calculation software was created to demonstrate some of the ways that Microsoft Excel can be used as a programming language. For this calculation device, I created a semi-random number generator, using Microsoft Excel's NOW() and TODAY() functions, so that the computer’s clock is used to generate sets of random numbers. These numbers are transmitted to 10 calculation mechanisms, which perform various types of calculations, including algebra, trigonometry, and calculus.  
   
 

This software was initially created with Microsoft Excel, which actually can be converted electronically to a few standard computer languages, using specialized software. I converted this software device to a JavaScript/HTML format, which functions over the Internet, in standard web browsers.                         

                                                     

 
Section 1) The Semi-Random Number Generator
  This section displays the semi-random number generator, and a useful conceptualization for creating software with Microsoft Excel. Specifically, the formulas comprising software can be connected together in various configurations, with virtual wires. This is similar to the way electronic circuits are created. This basically involves input boxes and formulas transmitting numbers or calculated results to other formulas for additional calculations. This can involve configurations involving hundreds of connections, and many virtual wires. The virtual wires are of course mental conceptualizations that are normally invisible in the software, but in this section I created black line showing the connections for one formula to another. Most of the virtual wires are displayed on the right.  
   
   
  Note: The computations are displayed in red numbers and text. The spreadsheet formulas are displayed in black type, with an equal-sign on the left side, such as the following example:  
  =IF(C36>8,H27,H25)  
  By default the software, automatically changes most of the random numbers, when you enter or delete data, or press the update button. This is actually based on time intervals ranging from a second or less.  
  If you want to control the length of time before the random numbers are changed, enter the time duration you prefer in minutes in the white box below. If you want to maintain the random numbers until 12 AM, enter 1440 in the box below. If you want to maintain them for one hour, enter 60, for two hours 120, etc. If you want the random numbers to change, in a matter of seconds, enter 0.01667 for each second. For 30 seconds enter 0.5, for 15 seconds enter 0.25. However, regardless of the numbers you enter, at 12 AM the random numbers are automatically changed.  
   
   
]   Input Box One>   virtual wire    
                             
    IMPORTANT NOTE: The numbers do not change, if you do NOT update the time. To update the timing mechanism for the Excel version, place the cruiser on a green box, and press the delete key. For the JavaScript version, press the update button, with the words: LEFT CLICK TO UPDATE TIME. You can also update the time by entering or deleting data, or closing and reopening the software,which works for both the Excel and JavaScript versions.        
       
       
      virtual wire>    
             
             
             
  The four black boxes on the right are storage devices for the messages, which are displayed in red type above and below. These messages change when the user enters numbers in the white input box BELOW. The formulas used to sense whether or not numbers were entered in the white box, and to switch the messages that are displayed, are:                    
      The software is set to generate random numbers using the computer’s clock, which it will automatically transmit to the 10 calculation mechanisms.            
  For the message above =IF(C37>8,H28,H26) For the message below) =IF(C37>8,H33,H31)                    
              The software will generate random numbers, WITH THE NUMBER YOU ENTERED IN THE WHITE BOX, and then it will transmit these numbers to the 11 calculation mechanisms.            
                         
                     
      If you do NOT want to use the computer’s clock to generate random numbers, enter a number in the white box below, with nine or more digits.            
                     
      IF YOU WANT TO USE THE COMPUTER’S CLOCK TO GENERATE RANDOM NUMBERS, delete the number in the white box below. When this is done, the software will use the computers timing mechanism to generate sets of random numbers.            
    Input Box Two                    
                       
          virtual wire        
                       
  The above counts the number of digits entered by the user, with this formula: =(LEN(C39)*1)-1*(C35=0), and then transmits the results to other formulas for additional computation.        
    virtual wire            
  The above takes the absolute value of the number entered by the user, with this formula: =ABS(C35), and transmits it to other formulas for additional processing.                
  virtual wire              
  The above is box-1W, and it uses Microsoft Excel =NOW() function to access the computer’s clock. With the following formatting code the time and a is displayed with this function: dddd, mmmm d, yyyy, h:mm:ss AM/PM              
                         
  Note, there are two number generating systems, that use the computer’s clock to generate semi-random numbers. One system, is represented by white boxes, and the other system by light blue boxes. The first system, with the white boxes, does NOT provide user control of time intervals, for generating numbers. However, the second system, with the blue boxes, uses the number of minutes entered by the user, to control time intervals, for generating new sets of numbers.              
                     
  The above is box-2W, and it uses Microsoft Excel's =TODAY() function to access the computer’s clock, which displays today's date, in the style presented above. This requires the following custom formatting code: "Today is" dddd, mmmm d, yyyy                  
                       
                       
  <virtual wire The above is box-3W, and it, accesses the cell with the =NOW()and TODAY() function, and subtracts as follows: TODAY()-NOW(). This is done with the following formula: =B41-B45            
             
  <virtual wire The above, is an automatic switching device, which senses if the user entered a number with nine digits or more in the white input box above, which is done with =IF(C37>8, C39, C47) If the user entered the number, with the required number of digits, the connections to the white input box are activated, and the connections that relate to the computers clock are turned off. If the user did not enter a number, the connections to the computer’s clock are maintained. All of this results in one number, which is user entered, or computer-generated, which is transmitted to other formulas for further processing.      
  virtual wire>      
  <virtual wire Box1B, above, and box-2B, and box-3B, below, comprise a separate number generating system that uses the computer’s clock to generate semi-random numbers, based on a time interval set by the user. Box-1B generates a three digit number, with the following formula: =RIGHT(TODAY(),3)                    
                       
                       
  <virtual wire     virtual wire >              
        < virtual wires >      
    Box-2B, above, generates a single digit number, with the following formula:                    
  =1*(RIGHT((TRUNC(((NOW()*24*60))/(D16)))))                    
             
  Box-4W, above, generates a number, with nine or more digits, without decimals, based on input from the computer's clock, or from a number entered by the user, in input box two. This is done with the following formula: < virtual wires > Box-3B, above generates, a number over nine digits long, with the data input for box-1B and Box-2B. This is done with the following formula: =1*(C52*(((2*TT+3&((TT=0)+TT)&(2*TT+1)&2*TT+3))^2))      
=ROUND(1000000000*$C$50,0) < virtual wires >      
    virtual wires    
  The box above, is an automatic sensing and switching mechanism. That is, based on numbers that the user entered or did NOT enter in the three white input boxes above, the switching mechanism selects one of the following for random number generation: 1)Default settings, 2)User selected time intervals, 3)User entered number, without using the computer’s clock. The formula I devised to carry out this task is: =IF(C37>8, C39, IF(D16=0, C60, E60))                    
                     
                     
                       
    The above, accesses the first digit of the number generated by the computer's clock, or with the number entered by the user. This number has nine or more digits. The formula I devised to access the first digit is as follows: =1*RIGHT(LEFT($C$63,1)) The cell with this formula was renamed as: Digit1, so that Digit1 will equal the first digit. See below.                
                   
                       
    The above, accesses the second digit, with the following formula: =1*RIGHT(LEFT($C$63,2)) The cell with this formula was renamed Digit2 so that =Digit2, will display the second digit. See below.              
                   
                       
    The above, accesses the third digit, with the following formula: =1*RIGHT(LEFT($C$63,3)) The cell with this formula was renamed Digit3 so that =Digit3, will display the third digit. See below.              
    virtual wire            
                       
    The above, accesses the fourth digit, with the following formula: =1*RIGHT(LEFT($C$63,4)) The cell with this formula was renamed Digit4 so that =Digit4, will display the fourth digit. See below.            
             
                         
      virtual wire          
                       
    The above, accesses the fifth digit, with the following formula: =1*RIGHT(LEFT($C$63,5)) The cell with this formula was renamed Digit5 so that =Digit5, will display the fourth digit. See below.            
    virtual wire        
                       
    The above, accesses the sixth digit, with the following formula: =1*RIGHT(LEFT($C$63,6)) The cell with this formula was renamed Digit5 so that =Digit5, will display the sixth digit. See below.            
    virtual wire      
                       
    The above, accesses the seventh digit, with the following formula: =1*RIGHT(LEFT($C$63,7)) The cell with this formula was renamed Digit7 so that =Digit7, will display the seventh digit. See below.            
                       
                         
        virtual wire    
                       
    The above, accesses the eighth digit, with the following formula: =1*RIGHT(LEFT($C$63,8)) The cell with this formula was renamed Digit8 so that =Digit8, will display the eighth digit. See below.            
      virtual wire  
                       
    The above, accesses the ninth digit, with the following formula: =1*RIGHT(LEFT($C$63,9)) The cell with this formula was renamed Digit9 so that =Digit9, will display the ninth digit. See below.            
                       
  Section 2) Generating A Second And Third Set Of  
Semi-Random Numbers From the First Set
  In this section, the software generates a second and third set of semi-random numbers from the first set. There are actually a large number of ways that this could be achieved. This software uses mathematical formulas to generate the second set, and the rearrangement of digits to generate the third set. This should be clear after you examine the material in this section.  
   
  In the previous section, I demonstrated the connections between formulas, by displaying virtual wires, in black type connecting the formulas together, in various configurations. In this section, the connections between formulas, and cells are implied, when the name of a cell is used in a formula. For example, if I create a formula with =A1+B1, and place it in cell D5, it should be apparent that the formula in cell D5 is accessing the numbers, or calculated results in cells A1 and B1, and adding them together. This can be thought of as virtual wires transmitting data from cells A1 and B1 to cell D5, to perform the addition.  
   
   
  Some of the cells have been renamed, so that is easier to remember what the formulas in the cells generate. For example, cell Digit1, displays the first digit from the semi-random number generated in the previous section. Similarly, cell Digit2, displays the second, Digit3 displays the third, etc. The following formulas uses the cell designations Digit1 to Digit9, to generate a third set of numbers, which range from 0.1 to 1. These limits are the result of the design of the formula used to generate the second set. See below:  
   
   
  The formula used for the following is: =(DigitX+1)/10  
The value of X in this formula rangers from 1 to 9
       
  Digit1 = = cell named DigitS1  
  Digit2 = = cell named DigitS2  
  Digit3 = = cell named DigitS3  
  Digit4 = = cell named DigitS4  
  Digit5 = = cell named DigitS5  
  Digit6 = = cell named DigitS6  
  Digit7 = = cell named DigitS7  
  Digit8 = = cell named DigitS8  
  Digit9 = = cell named DigitS9  
  The sum of the digits The sum of the small digits  
   
  Above cell renamed SUM The above cell renamed sumS  
  Formula for above is The formula for the above is  
  =SUM(C111:C119) =SUM(D111:D119)  
  Average of the digits Average of the small digits is:  
   
  The above cell was Above cell renamed as digitSA  
  renamed as DigitA The formula for the above is  
  Formula for above is: =sumS/9  
  =SUM/9                        
         
  The Following List of Semi-Random Numbers, were Created Above, in This Section.            
   
   
   
   
   
   
   
   
   
   
   
   
   
                             
         
  The above random numbers were created with formulas, using conventional mathematics. The list of random numbers presented below were created by recombining digits in various configurations. (The digits I am referring to were created in section 1, and they are Digit1, Digit2, Digit3, Digit4, Digit5, Digit6, Digit7, Digit8, and Digit9.)  
   
  This rearranging of the digits does not involve conventional mathematics. The general formula I devise for this process consists of the following: =1*((DigitX=0)+DigitX&DigitY). X and Y in this formula represent any number from 1to9.  
   
  The first part of this formula is designed to prevent a number with a zero as the first digit. That is if the random number for DigitX turns out to be zero, the statement (DigitX=0) would be true. True statement are represented by 1 in Microsoft Excel, especially if they are multiplied by 1. The 1 is added to the zero, which provides 1 as the first digit. If DigitX does not equal zero, this statement DigitX=0 is false. False statements in Microsoft Excel are represented by zero, which does not change the value of the first digit.  
   
  The second portion of the formula, involves a method of combining digits, or mathematical expressions, using the & sign. For example, =1*(2&5)=25. Alternatively this can be achieved with 0+(2&5)=25. It is necessary to multiplied by 1, or to add 0 to the number, so that it is converted to a true number that can be used in mathematical calculations. The above might sound strange, but it works quite well,which will be apparent if you examine the following material.  
   
   
         
                 
    (The cell below was renamed as: A) A Semi-random two digit number is generated with the formula presented below:            
    =1*(((Digit6=0)+Digit6)&Digit9)            
               
                             
    (The cell below was renamed as: B) A Semi-random two digit number is generated with the formula presented below:            
    =1*(((Digit9=0)+Digit9)&Digit5)            
               
                             
    (The cell below was renamed as:C_) A Semi-random two digit number is generated with the formula presented below:            
    =1*(((Digit8=0)+Digit8)&Digit7)            
               
                             
    (The cell below was renamed as: D) A Semi-random two digit number is generated with the formula presented below:            
    =1*(((Digit5=0)+Digit5)&Digit6)            
               
                             
    (The cell below was renamed as: E) A Semi-random two digit number is generated with the formula presented below:            
    =1*(((Digit7=0)+Digit7)&Digit9&Digit4)            
               
                             
    (The cell below was renamed as: F) A Semi-random three digit number is generated with the formula presented below:            
    =(1*(Digit5=0)+Digit5)&Digit7&Digit8            
               
                             
    (The cell below was renamed as: G) A Semi-random three digit number is generated with the formula presented below:            
    =1*(((Digit6=0)+Digit6)&Digit5&Digit9)            
               
             
    (The above cell was renamed as: H) A Semi-random three digit number is generated with the formula presented below:            
    =1*(((Digit8=0)+Digit8)&Digit7&Digit6)            
               
                           
     
The Following Semi-Random Numbers were Created Above, in This Section            
   
   
   
   
   
   
   
   
                             
Section 3) 10 Calculation Devices, that Use the Semi-Random Numbers, for Algebra, Trigonometry, Calculus, and
  the Geometric Calculations for a Circle and Square  
  In this section, there are 10 calculation devices, that receive some of the random numbers generated in the first two sections of this software. These devices perform various types of calculations, involving algebra, trigonometry, calculus, and geometric calculations for a circle and square. Each of these devices, performs a series of multiple calculations simultaneously.  
Calculation Mechanism 1) Algebraic Equation
with a Step-By-Step Solution
  Spreadsheet formulas are displayed in black type, within =  
  The calculated result are displayed in red type.  
   
  =A&"X+"&B&" = "&C_  
   
  ="X"&A&"= "&C_&-B  
   
  =A&"X= "&C_-B  
    X=  
  =(C_-B)/A  
  The calculations are check below  
   
  =A*D215&"+("&B&") = "&C_  
   
  =A*D215+B&"="&C_  
         
Calculation Mechanism 2) Algebraic Equation
with Step-By-Step Solution
  Spreadsheet formulas are displayed in black type, within =  
  The calculated result are displayed in red type.  
   
  =D&"X+"&E&" = "&F  
   
  ="X"&D&"= "&F&-E  
   
  =D&"1X= "&F-E  
    X =  
  =(F-E)/D  
  The calculations are check below  
   
  =D*D233&"+("&E&") = "&F  
   
  =D*D233+E&"="&F  
         
Calculation Mechanism 3) Algebraic Equation
with Step-By-Step Solution
  Spreadsheet formulas are displayed in black type, within =  
  The calculated result are displayed in red type.  
   
  =(1+Digit6)&"X+"&H&" = "&F*A  
   
  =(1+Digit6)&"X="&F*A&"-"&H  
   
  =(1+Digit6)&"X="&F*A-H  
    X =  
  =(F*A-H)/(1+Digit6)  
  The calculations are check below  
   
  =(1+Digit6)*D251&"+"&H&" = "&F*A  
   
  =(1+Digit6)*D251+H&" = "&F*A  
       
Calculation Mechanism 4) Algebraic Equation Involving
the Hyperbolic Tangent, with Step-By-Step Solution
  Spreadsheet formulas are displayed in black type, within =  
  The calculated result are displayed in red type.  
   
  ="TANH("&A&")X+"&"TANH("&B&") = "&C_  
   
  ="TANH("&A&")X= "&C_&"-"&"TANH("&B&")"  
   
  ="TANH("&A&")X="&C_&"-"&TANH(B)  
   
  =TANH(A)&"X="&C_&"-"&TANH(B)  
    X=  
  =(C_-TANH(B))/TANH(A)  
  The calculations are check below  
   
  ="TANH("&A&")"&D271&"+"&"TANH("&B&") = "&C_  
   
  =TANH(A)*D271&"+"&TANH(B)& "= "&C_  
   
  =TANH(A)*D271+TANH(B)&"= "&C_  
         
Calculation Mechanism 5) Algebraic Equation Involving
the Hyperbolic Tangent, with Step-By-Step Solution
  Spreadsheet formulas are displayed in black type, within =  
  The calculated result are displayed in red type.  
   
  ="TANH("&(Digit7+1)&")X+"&"TANH("&(Digit5+3)&") = "&A*(Digit7+1)  
   
  ="TANH("&(Digit7+1)&")X= "&A*(Digit7+1)&"-"&"TANH("&(Digit5+3)&")"  
   
  ="TANH("&(Digit7+1)&")X="&A*(Digit7+1)&"-"&TANH((Digit5+3))  
   
  =TANH((Digit7+1))&"X="&A*(Digit7+1)&"-"&TANH((Digit5+3))  
    X=  
  =(A*(Digit7+1)-TANH((Digit5+3)))/TANH((Digit7+1))  
  The calculations are check below  
   
  ="TANH("&(Digit7+1)&")"&D293&"+"&"TANH("&(Digit5+3)&") = "&A*(Digit7+1)  
   
  =TANH((Digit7+1))*D293&"+"&TANH((Digit5+3))& "= "&A*(Digit7+1)  
   
  =TANH((Digit7+1))*D293+TANH((Digit5+3))&"= "&A*(Digit7+1)  
       
Calculation Mechanism 6) Algebraic Equation Involving
the Hyperbolic sine and cosine, with Step-By-Step Solution
  Spreadsheet formulas are displayed in black type, within =  
  The calculated result are displayed in red type.  
   
  ="SINH("&(DigitS7)&")X+"&"COSH("&(DigitS5)&") = "&A*(DigitS7)  
   
  ="SINH("&(DigitS7)&")X= "&A*(DigitS7)&"-"&"COSH("&(DigitS5)&")"  
   
  ="SINH("&(DigitS7)&")X="&A*(DigitS7)&"-"&COSH((DigitS5))  
   
  =SINH((DigitS7))&"X="&A*(DigitS7)&"-"&COSH((DigitS5+3))  
    X=  
  =(A*(DigitS7)-COSH((DigitS5)))/SINH((DigitS7))  
  The calculations are check below  
   
  ="SINH("&(DigitS7)&")"&D315&"+"&"COSH("&(DigitS5)&") = "&A*(DigitS7)  
   
  =SINH((DigitS7))*D315&"+"&COSH((DigitS5))& "= "&A*(DigitS7)  
   
  =SINH((DigitS7))*D315+COSH((DigitS5))&"= "&A*(DigitS7)  
       
  Calculation Mechanism 7) Performs over 15  
  Trigonometric Calculations, Simultaneously.  
   
   
Angles rounded to decimal places
Numbers rounded to decimal places
  The spreadsheet formulas are displayed in black type, with =  
  Calculated result are displayed in red type  
       
  ="Angle B= "&ROUND(ATAN(tanB),RD)&" Radians"  
     
="Angle B= "& ROUND(DEGREES(ATAN(tanB)),RD )&" Degrees"
                             
      Hypotenuse Cell renamed: hyp is:
     
    =ROUND((A*A+B*B)^(1/2),RN )
                             
       
   
    ="Angle A = "&ROUND(ATAN(tanA),RD)&" Radians"
     
="Angle A= "& ROUND(DEGREES(ATAN(tanA)),RD )&" Degrees"
="The perimeter of the triangle is "&ROUND(A+B+(A*A+B*B)^(1/2),RN)
="The area of the triangle is "&ROUND((A*B)/2,RN)
       
                             
 
 
                           
="&ROUND(A/hyp,RN)
 
 
 
 
                           
="="&ROUND(B/hyp, RN)
 
                             
 
 
                           
="="& ROUND(A/B,RN)
   
                             
 
 
                           
="="&ROUND(B/A,RN)
   
         
   
  ="Tan(A)*Cot(A)="&tanA*cotA  
                             
 
 
                           
  ="="&ROUND(hyp/B,RN)  
   
                             
   
  ="cos(A)*sec(Angle A)="&cosA*secA  
 
 
 
  ="&ROUND(hyp/A,RN)  
                           
   
                             
   
  ="sin(A)*csc(A) = "&sinA*cscA  
         
  The Following Trigonometric Calculations Are For Angle B  
   
   
                             
 
 
  ="="&ROUND(B/hyp,RN)  
                           
 
 
 
 
  "= "&ROUND(A/hyp, RN)  
                           
 
 
 
 
  ="="& ROUND(B/A,RN)  
                           
   
                             
 
 
  ="="&ROUND(A/B,RN)  
                           
   
                             
   
  ="Tan(A)*Cot(A)="&tanA*cotA  
                             
 
 
  ="="&ROUND(hyp/A,RN)  
                           
   
                             
   
  ="cos(B)*sec(B) = "&ROUND(cosB*secB,5)  
 
 
 
  ="="&ROUND(hyp/B, RN)  
                           
   
       
  The Following Trigonometric Calculations Apply To Both Angles A and B  
                             
   
  ="sin(B)*csc(B)="&sinB*cscB  
      2 2                    
    sin(A) +  cos(A)  
  ="="&ROUND(sinA*sinA+cosA*cosA,RN)  
      2 2                    
    sin(A) +  sin(B)  
  ="="&ROUND(sinA*sinA+sinB*sinB, RN)  
      2 2                    
    cos(A) +   cos(B)  
  ="="&ROUND(cosA*cosA+cosB*cosB,RN)  
     
      -2 -2                    
    csc(A) +   sec(A)  
  =" = "&ROUND((cscA^(-2))+(secA^(-2)),RN)  
      2.5 2.5                    
    sin(A) +  cos(A)  
  ="="&ROUND((sinA^2.5)+(cosA^2.5), RN)  
      3 3                    
    sin(A) +  cos(A)  
  ="="&ROUND((sinA^3)+(cosA^3),RN)  
      4 4                    
    sin(A) +  cos(A)  
  ="="&ROUND((sinA^4)+(cosA^4),RN)  
                             
   
  ="sin(A)+cos(A) = "&ROUND(sinA+cosA,RN)  
                             
   
  ="tan(A)+cot(A) = "&ROUND(tanA+cotA,RN)  
                             
   
  ="csc(A)+sec(A) = "&ROUND(cscA+secA,RN)  
       
Calculation Mechanism 8) Calculations For A Rectangle
    The spreadsheet formulas are displayed in black type within = and the calculated result are displayed in red type.          
                             
                         
                         
 
    ="The perimeter is "&2*G+2*H
                         
   
  ="The area is "&G*H
 
       
Calculation Mechanism 9) Calculations For A Circle
    The spreadsheet formulas are displayed in black type within = and the calculated result are displayed in red type.          
                             
       
      ="The radius is "&C_  
                             
       
      ="The diameter is "&2*C_  
                             
   
  ="The perimeter is "&2*PI()*C_  
   
  ="The area is "&PI()*(C_*C_)  
       
Calculation Mechanism 10) Calculus
  The spreadsheet formulas are displayed in black type within = and the calculated result are displayed in red type.  
     
                           
                             
                           
                 
  ="dx = "&A-B    
                           
                           
                 
                             
                           
                             
                           
                 
  =" xdx = "&(G*G-H*H)/2  
                           
                           
                 
                             
                           
                             
                           
                 
  =G&"xdx = "&G*((D*D-C_*C_)/2)  
                           
                           
                             
                             
                           
                             
                           
                 
  =G*B&"xdx = "&G*B*((digitSA*digitSA-DigitS1*DigitS1)/2)