Introduction
Welcome to JAVA-CALC. This is the manual for the scaled down version JAVA-CALC 0.9.3, reduced by the menu and the user-variables. This version was programmed because of problems with NETSCAPE 2.0 running on PCs under WINDOWS 3.11 with 16MB or less. NETSCAPE seems to have problems running large Java-Scripts on this platform. If you are familiar with any RPN calculator from HP or the programming language FORTH you probably do not need to read this manual at all. JAVA-CALC is written completely in Java-Script and best viewed with NETSCAPE 3.0 (if you do not have NETSCAPE, get version 3.0 now).
Why RPN?
Reverse Polish Notation is a highly extensible notation for calculating equations and whatsoever. The highly familiar INFIX notation used for many house-hold calculators has the operator between the operands. An example would be: 3*(7+8) The big disadvantage of this notation is that the first operand is not available by the user after the operator is given meaning that this notation is almost not user-extensible at all. RPN on the other hand is a POSTFIX notation with the operator after the operands. The example above in RPN would be: 3 7 8 + * The first thing noticable is that no brackets are required. Also, this notation is higly extensible since both operators are available for a user defined extension. Also, to distinguish between numbers entered by the user a ENTER key is required.
Requirements
Any browser incorporating Java-Script is usable. JAVA-CALC has been tested on the following platforms: - SUN IPX under SOLARIS 2.4 with NETSCAPE 2.0/3.0B4. - HP715/735 under HP-UX with NETSCAPE 2.0/3.0B4. - MAC PPC under SYSTEM 7.5.2 with 8MB and NETSCAPE 2.0/3.0B4. - PC (PENTIUM) under WINDOWS 95 with 32MB and NETSCAPE 3.0B4. - PC (468/DX2) under WINDOWS 3.11 with 16MB and NETSCAPE 2.01.
Data types
JAVA-CALC 0.9.3 has two data types: - REAL within a range of app. -1e308.. +1e308 and an accuracy of app. 15 digits. - COMPLEX within a range of -1e308-i1e308...+1e308+i1e308 and an accuracy of app. 15 digits for both parts.
The Input Stack
JAVA-CALC incorporates a stack with a depth of 4 with the X-Register being on top of the stack and the T-Register being on the bottom. For saving screen estate only the X and Y register are displayed. It can be shown that any equation can be calculated with this stack. Any number entered by the user is pushed onto the stack while the stack itself is scrolled. To enter two numbers the ENTER key must be pushed inbetween. This is the only time when the ENTER key is required. Thus, calculating the following: 3*(7+8) the user must press the following keys: 3 ENTER 7 ENTER 8 + * Functions which require only one operand (like sin, cos etc.) do not require to press the ENTER key. Hence, calculating: sin(3*PI) the user must press the following keys: 3 PI * SIN
Keys of the Calculator
0...9 : the usual keys found on any calculator. . : distinguishs between integer part (IP) and floating part (FP). E : used to enter numbers to the power of 10 (e.g. 1.2e117). +/- : changes the sign of either the mantissa or the exponent. depending how far the user has input a number already.. <- : deletes either the last input of the user or the number in X. PI : puts PI (3.141592653589793...) onto the stack. + : X=Y+X - : X=Y-X x : X=Y*X / : X=Y/X SCROLL: scrolls the stack down, i.e., X=Y, Y=Z, Z=T. SWAP : swaps X and Y. F0..F5: function keys, depending on the menu. 1/X : X=1/X Y^X : X=Y^X X^0.5 : X=X^0.5 X^2 : X=X^2 LOG X : X=log(x), i.e., logarithm to the base of 10. 10^X : X=10^X LN X : X=ln(x), i.e., loagrithm to the base of e (2.718281...). e^X : X=e^X SIN X : X=sin(X) COS X : X=cos(X) TAN X : X=tan(X) ASIN X: X=asin(X) ACOS X: X=acos(X) ATAN X: X=atan(X) STO : Stores the X register into a user variable RCL : Recalls the user variable into the X register DEG : Degree with 360 units RAD : Radiant GRAD : Degree with 400 unites (new degree) FIX : Fixed length representation with X digits SCI : Scientific representation with X digits ENG : Engineering representation with X digits exponent is a multiple of 3 ->CPLX: Converts two real numbers in X and Y into a complex number in X ->REAL: Converts a complex number in X into two two real numbers in X and Y ABS : Absolute value of a real or complex number in X. ARG : Argument of the complex number in X equals to ARCTAN (IM{X}/RE{X}) X! : Calculates X!
Known Bugs
- Incorrect results like NaN or +Infinity can be scrolled by the stack. - NaN is displayed as: NaNeNaN. - Fixed-Width fonts on buttons do not work properly with NETSCAPE 2.0 for WINDOWS 95, reendering the buttons not uniformly. - Different Operating Systems require different screen estates to display the calculator entirely. On a SUN IPX any screen larger than 800X600 pixels is big enough.