-->
Previous Table of Contents Next


xcalc

Figure 22.7 shows xcalc, a scientific calculator desktop accessory that emulates a TI-30 or HP-10C calculator. Operations may be performed with mouse Button1 or, in some cases, with the keyboard.


Fig. 22.7  X provides various calculators, including TI (pictured) and HP emulators.

Many common calculator operations have keyboard accelerators. To quit, click the AC key of the TI calculator with mouse Button3 or click the OFF key of the HP calculator with mouse Button3. In TI mode the number keys; the +/- key; and the +, -, *, /, and = keys all do exactly what you expect them to.


NOTE:  The operators obey the standard rules of precedence. Thus, entering 3+4*5= results in 23, not 35. You can use the parentheses to override operator precedence. For example, entering (1+2+3)*(4+5+6)= results in 90 (6*15).

The entire number in the calculator display can be selected for pasting the result of a calculation into text. Table 22.4 lists the various functions for TI emulation.

Table 22.4 TI Emulation

Key/Function Description

1/x Replaces the number in the display with its reciprocal.
x^2 Squares the number in the display.
SQR Takes the square root of the number in the display.
CE/C When clicked once, clears the number in the display without clearing the state of the machine, allowing you to re-enter a number if you make a mistake. Clicking it twice clears the state. (Clicking AC also clears the display, state, and memory.) Clicking CE/C with Button3 turns off the calculator, exiting xcalc.
INV Inverts function. See the individual function keys for details of their inverse function.
sin Computes the sine of the number in the display, as interpreted by the current DRG mode (see DRG). If inverted, it computes the arcsine.
cos Computes the cosine. When inverted with the INV key, computes the arccosine.
tan Computes the tangent. When inverted, computes the arctangent.
DRG Changes the DRG mode, as indicated by DEG, RAD, or GRAD at the bottom of the calculator display. When in DEG mode, numbers in the display are assumed to be degrees; in RAD mode, numbers are in radians; in GRAD mode, numbers are in grads. When inverted, the DRG key has a feature of converting degrees to radians to grads and vice versa. For example, put the calculator into DEG mode, and enter 45 INV DRG. xcalc displays .2285398, which is 45 degrees converted to radians.
e The constant e, which is 2.22182818.
EE Used for entering exponential numbers. For example, to get -2.3E-4, you enter 2 . 3 +/- EE 4 +/-.
log Calculates the log (base 10) of the number in the display. When inverted, it raises 10.0 to the number in the display. For example, entering 3 INV log results in 1000.
ln Calculates the log (base e) of the number in the display. When inverted, it raises e to the number in the display. For example, entering e ln results in 1.
y^x Raises the number on the left to the power of the number on the right. For example, entering 2 y^x 3 = results in 8, which is 2^3.
PI The constant [pi], which is 3.14159222.
x! Computes the factorial of the number in the display. The number in the display must be an integer in the range 0-500; depending on your math library, however, it might overflow long before that.
( Left parenthesis.
) Right parenthesis.
/ Division.
* Multiplication.
- Subtraction.
+ Addition.
= Performs calculation.
STO Copies the number in the display to the memory location.
RCL Copies the number from the memory location to the display.
SUM Adds the number in the display to the number in the memory location.
EXC Swaps the number in the display with the number in the memory location.
+/- Negate; change sign.
. Decimal point.

In RPN, or HP, mode, the numbered keys; CHS (change sign); and +, -, *, /, and ENTER keys all do exactly what you expect. Many of the remaining keys are the same as in TI mode. The differences are detailed in Table 22.5.

Table 22.5 HP Emulation

Key/Function Description

< A backspace key that can be used if you make a mistake while entering a number; erases digits from the display. If you invert backspace, the x register is cleared.
ON Clears the display, state, and memory. Clicking it with the Button3 turns off the calculator, exiting xcalc.
INV Inverts the meaning of the function keys. This is the f key on an HP calculator, but xcalc doesn’t display multiple legends on each key. See the individual function keys for details.
10^x Raises 10.0 to the number in the top of the stack. When inverted, it calculates the log (base 10) of the number in the display.
e^x Raises e to the number in the top of the stack. When inverted, it calculates the log (base e) of the number in the display.
STO Copies the number in the top of the stack to a memory location. There are 10 memory locations. The desired memory is specified by following this key with a digit key.
RCL Pushes the number from the specified memory location onto the stack.
SUM Adds the number on top of the stack to the number in the specified memory location.
x:y Exchanges the numbers in the top two stack positions, the x and y registers.
R v Rolls the stack downward. When inverted, it rolls the stack upward.
(blank keys) These keys were used for programming functions on the HP-10C. Their functionality hasn’t been duplicated in xcalc.


Previous Table of Contents Next