The CALCULATOR command enters the reverse Polish notation calculator sub-menu. The sub-menu commands are mainly the normal calculator arithmetic and function commands. At any time values may be entered which are stored one by one on the ``stack'', or an operator command may be entered to perform an operation on one or more of the values previously entered on the stack. The result replaces the values operated upon. In addition to operator commands such as *, +, -, / stack manipulation and display commands are available. For a full list of the available commands type ?. As always the command EXIT or the command QUIT is used to return to the main menu. The calculator may be used in normal arithmetic mode, but also supports complex arithmetic. To enter complex constants type two values separated by a space and/or a comma.
The complete list of available commands and their function is:
Note: Since the commands may be entered in any shortened non-ambiguous form, common forms of naming the functions will work e.g. sin, cos, exp, tan are all understood.
The VARIABLE command allows the value in the top of the stack to be stored as a program variable for later use, and use in macros (see Section 19, Page ).
At first a reverse polish notation calculator may seem complicated to use, but with a small amount of practice it is very easy, but of course different 17.
Before any operation, e.g. multiplication of two numbers, can be performed the operands, e.g. the two numbers, must be first entered onto the ``stack''. Operands (numbers) are entered onto the stack simply by typing their value followed by the RETURN key. Each new value is placed on the top of the ``stack'', previous values being stored underneath it.
The following example shows the program output produced when multiplying 0.496 and 3.567.
Main menu: ENTER COMMAND [INPUT DATA]:calc ENTER VALUE OR OPERATOR:0.496 ENTER VALUE OR OPERATOR:3.567 ENTER VALUE OR OPERATOR:* RESULT: 1.769232 .0000000E+00 ENTER VALUE OR OPERATOR:exit
The following example shows how to calculate (note trigonometric functions work in degrees).
ENTER VALUE OR OPERATOR:20 ENTER VALUE OR OPERATOR:cos RESULT: .9396926 .0000000E+00 ENTER VALUE OR OPERATOR:2 ENTER VALUE OR OPERATOR:pow RESULT: .8830222 .0000000E+00 ENTER VALUE OR OPERATOR:20 ENTER VALUE OR OPERATOR:sin RESULT: .3420201 .0000000E+00 ENTER VALUE OR OPERATOR:2 ENTER VALUE OR OPERATOR:pow RESULT: .1169778 .0000000E+00 ENTER VALUE OR OPERATOR:+ RESULT: 1.000000 .0000000E+00
The following example shows the entry of complex numbers and their multiplication.
ENTER VALUE OR OPERATOR:1 -1 ENTER VALUE OR OPERATOR:0 -1 ENTER VALUE OR OPERATOR:* RESULT: -1.000000 - 1.000000
The following example shows how to find out the photon energy (in keV) corresponding to a wavelength of 1.0Å.
ENTER VALUE OR OPERATOR:1 ENTER VALUE OR OPERATOR:energy RESULT: 12.39852 .0000000E+00