Example use of an experimental calculator designed for use in free to the end user distance education.
William Overington
This text accompanies the experimental calculator on this web site. The calculator is written in
JavaScript, though a user of the calculator does not need to know any JavaScript at all, or even
to know that the calculator is written in JavaScript.
In intended use, the computer screen is displaying two web pages at the same time, within the
structure of a frameset that is carried in a third web page. This third web page is the page that
is requested to be displayed by the user. The other web pages are opened by the system in
response to frame statements within the frameset. The frame layout has been chosen so as to
produce the effect of being able to view a web page at normal width while having a calculator
available at the bottom of the screen so that calculations can be made as desired.
The files are as follows.
The file fram0001.htm holds the frameset.
The file calc0001.htm carries all of the information necessary to instruct the browser to
produce the calculator and its actions.
The file calc9000.gif carries the background colour for the calculator.
The file demo0001.htm carries all of this text about the calculator.
The file demo9000.gif carries the background colour for this text.
The calculator would be applied to some new application by copying fram0001.htm to some new
file, such as, say, fram1001.htm, and then editing fram1001.htm so that the reference to
demo0001.htm is changed to whatever is desired, such as, say, phys0001.htm.
The package for this new application would then consist of the files as follows.
The file fram1001.htm holds the frameset.
The file calc0001.htm carries all of the information necessary to instruct the browser to
produce the calculator and its actions.
The file calc9000.gif carries the background colour for the calculator.
The file phys0001.htm carries the instructional text that is to be displayed with the
calculator beneath it.
As a good introduction both to the use of the calculator together with its limitations
and of its application in being made available along the bottom of the screen in conjunction
with a text that explains the calculation to be carried out, let us seek to evaluate, for
some randomly chosen angle, the
expression
sin 2θ + cos 2θ
which should produce the value 1 regardless of the angle chosen.
The calculator has been designed to be both comprehensive and compact.
This means that much shortened names are used on the buttons, so as to
be able to get all of the buttons used for calculating into one line,
in order to minimize the depth of the calculator area along the bottom
of the screen.
The shortened names should hopefully not lead to any confusion in the use the calculator.
It may, however, be helpful to mention that the meaning of such buttons as b= and =d may be
easily deduced by regarding them as assigning to the register to the left of the = sign a copy
of the value that is already in the register to the right of the = sign, without altering the
value in the register that is copied, together with regarding any missing register name as being
register a. This is simply a way of avoiding six uses of the letter a in the names of the
buttons and thereby helping to fit more buttons in the line of buttons.
The message window states what each button used for calculating does
whenever it is clicked.
The intention is that, in operational use as a calculator to support a learning text, the
message window will not be visible but will be below the bottom of the screen.
However, at any stage, the user is able to scroll down to the message window in order to
learn what is the effect of pressing a button.
These effects are always the same for each button and the facility is provided primarily to
help a user learn the meanings of the buttons due to the much shortened names.
First, please note the naming of the registers and then click the 0 button to clear all
the registers.
Now click rn to produce a random number, which will be 0 or greater and less than 1.
Now click sw to swap the random number into b, and then click in a and enter the
number 360.
Now click * and this will produce an angle in the range including 0 and less than
360 degrees.
Now click ra and this will convert to radians, which is the form needed in order to
use the sine and cosine functions.
Now click d= to copy this angle into d.
Click si to produce the sine
and then click ^2 to square it. Now click b= to store this intermediate value in b.
Now click =d to reload the value of the angle in radians. Click co to produce
the cosine, then ^2 in order to square it. Now click + in order to complete the
calculation.
The answer should be identically 1, though please realize that sometimes a value a tiny amount
off 1 is produced, due to the limitations of computing to less than an infinite number of
decimal places. Click r in order to round the result.
A second example is to compute the cube root of a number. First please clear all the registers
by clicking 0.
Please click in a and enter a positive number of your choice.
Next click in b and enter the number 3.
Now click the button 10 in order to produce the logarithm of base 10 of a.
Now click the / button in order to divide by the 3 that was entered into b previously.
Now click the 10^ button in order to produce the final result, the cube root of the number
that you chose earlier.
A third example is to imagine that one wishes to plot by hand a graph of the function
y = e-xsin x
and one wishes to calculate the value of y for each value of x.
Click 0 to clear the registers. Enter a value of x into register a.
Now click b= to copy the value of x into register b.
Now click - followed by - so that a now contains -x.
Now click ex to calculate e-x.
Now click sw to swap a and b and thereby bring the value of x into a.
Now click si to calculate sin x.
Now click * to complete the calculation and produce the desired value of y.
21 March 1998
Such other files as are specified within phys0001.htm by the author in order to make that
presentation, for example, a gif for the background and a number of gifs for the illustrations.